msgbox default..

If I don't supply a 'title' - where does vb get this info?
LVL 67
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Harisha M GEngineerCommented:

application name (project name)

sirbountyAuthor Commented:
Drat - let me clarify this...
I was using
msgbox "my text", vbok,

Apparently that was incorrect.
So if I wanted to explicitly use that same title in my code, how would I?
(good to see you again, btw)
Harisha M GEngineerCommented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

sirbountyAuthor Commented:
Even though it shows up in intellisense, it states:
ProductName is not a member of MyApplication... : \
sirbountyAuthor Commented:
...but 'works' - however it's showing the same thing I got from .Title...
Harisha M GEngineerCommented:
>> msgbox "my text", vbok,

Is it VB 6 or .NET ? You don't have vbOK as option in .NET
Harisha M GEngineerCommented:
Who told you MyApplication ? It's just Application
Harisha M GEngineerCommented:
And in VB 6 you use App.Name
sirbountyAuthor Commented:
It's .Net, I was using vbOk simply to signify the same in .Net
It 'converted' it to "MyApplication".
I type:
debug.write (application.Productname)
and it returns:
'ProductName' is not a member of 'MyApplication'
Harisha M GEngineerCommented:
But why are you bothering about that when it takes that value by default ?
sirbountyAuthor Commented:
Just curious really...
I was previously supplying for my 'title'.
But it was coming up with the 'shortened'/ugly version of it...
I yanked it off and let it use the default and it looks much nicer.  I'll leave it this way - but was curious where it pulls it from...
Harisha M GEngineerCommented:
Are you really using .NET and that too, VB.NET ? ;)

When you are running the project, you can see the Application.ProductName in the "Autos" window (which shows all the variables in the current scope)
Harisha M GEngineerCommented:
Which type of project is it ?
sirbountyAuthor Commented:
oh - no, just a windows app...
Harisha M GEngineerCommented:
Create a new project and let me know what


shows you
sirbountyAuthor Commented:
New project, with default of WindowsApplication1 reveals the same for

Going to WindowsApplication1, clicking Assembly Information and changing the title there reveals
Application.Productname                    WindowsApplication1
My.Application.Info.Title                      New Title
My.Application.Info.ProductName         WindowsApplication1

Same location and changing Product shows:
Application.Productname                    New Application
My.Application.Info.Title                      New Title
My.Application.Info.ProductName         New Application

Trying the above with only Assembly Name changed
Application.Productname                    <Root Namespace>
My.Application.Info.Title                     <Root Namespace>
My.Application.Info.ProductName         <Root Namespace>

and after changing Assembly Information's Title, I get what I want from

But this still doesn't tell me where msgbox get's it's default title from (coded version).
If I change Assembly Information's Title back to the shortname, with nothing in place for msgbox title, I get what I want for the title (apparently from the only attribute changed - the Assembly name).

So, the answer here is:
My.Application.Info.AssemblyName is used if you don't specify a Msgbox title (which I find very odd)...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.