Assigning Messagebox Windows Icon

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am writing an app in VB.NET which does some basic checks of file
availability etc on load of Sub Main. If files are missing the user is
prompted with a messagebox (MessageBox.Show). The problem is "form" icon is
blank on the window, and the object in the system tray is the standard
Windows blank form icon.

Is there a way to assign an icon to the form of the MessageBox just so it
looks more uniform and professional?

Thank you.

Tippy.
 
No you can't specify an icon for the upper left
corner of a messagebox, but if you specify an
owner window (use one of the overloads taking
a IWin32Window argument) it won't show up
in the task bar.

/claes
 
Bummer!

Thanks for your reply Claes.

Claes Bergefall said:
No you can't specify an icon for the upper left
corner of a messagebox, but if you specify an
owner window (use one of the overloads taking
a IWin32Window argument) it won't show up
in the task bar.

/claes
 
Depending on how important this is to you; you could create a custom message
box by creating a form derived class that emulates the message box by
providing the same functionality (and setting the icon on that form).
 

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

Back
Top