Expandable Message Box and MsgBox Icon in VB.NET

J

JB

Hi All,

I've been using MsgBox function in VB for years and now that I've
moved to .NET, I'd like to do something a little bit more fancy.
I would like to create a message box that can be expanded to display
more details about an error. I have 2 questions about that:
1 - Is there something like an expandable Message Box built in VB.NET
or will I have to create the form and do all the resizing myself?
2 - How can I display the icon like the one in MsgBox (e.g. a question
mark for MsgBoxStyle.Question, a red cross for MsgBoxStyle. Critical)

I'd appreciate any suggestion.
Thanks
 
M

Mr. Arnold

JB said:
Hi All,

I've been using MsgBox function in VB for years and now that I've
moved to .NET, I'd like to do something a little bit more fancy.
I would like to create a message box that can be expanded to display
more details about an error. I have 2 questions about that:
1 - Is there something like an expandable Message Box built in VB.NET
or will I have to create the form and do all the resizing myself?
2 - How can I display the icon like the one in MsgBox (e.g. a question
mark for MsgBoxStyle.Question, a red cross for MsgBoxStyle. Critical)

I'd appreciate any suggestion.
Thanks

http://www.vbdotnetheaven.com/Uploa...rticleID=a999bbfc-f47f-4567-8dd7-67629865b913

Your friend is Google.
http://www.google.com/search?hl=en&...&cd=1&q=using+a+message+box+in+VB.net&spell=1
 
J

JB



Hi All,

After quite a lot of searching, I've found on a news group a very
simple technique that works fine.
1 - Create an PictureBox control on the form
2 - Set the icon with the following code (in Load event for instance)
With Me.PictureBox1
.BackColor = Color.Transparent
.SizeMode = PictureBoxSizeMode.AutoSize
.Image = SystemIcons.Information.ToBitmap 'Other icons available
in SystemIcons
End With

JB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top