Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

Message box questions

Just a few questions about message boxes.

First of all, can i put in a customized icon in my message box? If so, how?

Secondly, I have heared you can make your own custom message boxes using dialog boxes, this true?

Thirdly, is there a way of changing font colour in message boxes?

Lastly, Can i place an image in a message box, watermarked so that text above it can be read?

Thanks for any input

David
0
Helix
Asked:
Helix
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
0
 
aelatikCommented:
Helix,

You can draw a form in the way you want and use it like a messagebox. You can put OK and CANCEL buttons and program it to act the same way as a message box.

The only important thing is to disable other forms while showing the custom messagebox form. This way your messagebox won't lose focus.

0
 
BuchankasCommented:
As I know there are two ways you can do that, first by doing as aelatik said, and making sure you show your message-box form as modal, using the "vbModal" constant. Second you could make use of an API which alters the ordinary message-box to a more user-defined style, but it is much more complex.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
khushbooCommented:
Can you clarify your first question? Are you asking to put an icon in a question box or are you trying to create your message box after clicking on certain buttons to display message box? Please clarify to provide you an answer.

Secondly, you cannot create a customized message box using a dialog box however you can use create it by using input box.

Lastly, I don't think you can change the text color or put an image in a messagebox.


0
 
khushbooCommented:
Can you clarify your first question? Are you asking to put an icon in a question box or are you trying to create your message box after clicking on certain buttons to display message box? Please clarify to provide you an answer.

Secondly, you cannot create a customized message box using a dialog box however you can use create it by using input box.

Lastly, I don't think you can change the text color or put an image in a messagebox.


0
 
pkmnfrkCommented:
1. In the intrinsic VB msgbox function, no. The icons are fixed by the OS.

2. Yes, you can make customized message boxes, but they are only masquerading as message boxes. You must also make sure to show it as modal:

frmBox.show vbModal

3. Again, no. I am sure that you can do it with the Windows API, but I haven't tried. Or, if you use #2 (above) then you can do whatever you need.

4. No. See #3.
0
 
JuleZzZCommented:
I think the best method of doing this would be to create a class/object of a similar messagebox to suit your needs then you can use it throughout your projects.
0
 
cofneverlivetotellCommented:
Just make a form and set the Border style to 3-Fixed dialog.  Add a few buttons and set it to come up centre screen.
0
 
CleanupPingCommented:
Hi Helix,
This old question (QID 20568005) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 
cofneverlivetotellCommented:
You can make your own message boxes quite easily;


Use the command ;

Msgbox "Caption", Icon, "Message"

Where it says caption, put in the caption you want the message box to have (Like Internet Explorer Error Message)

Where is says Icon, put a number to represent the icon(I am in school and I will post another message when i check the numbers at home)

Where it says message, put in the body text (Like Do You want to save your changes)

Hope this helps!

I will post the numbers in a few hours

Cofneverlivetotell
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now