|
-
Aug 23rd, 2000, 11:10 AM
#1
Thread Starter
PowerPoster
Is there a way to change the font on a VB messagebox? If so, how?
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Aug 23rd, 2000, 11:16 AM
#2
The font in a messagebox is defined in the windows display settings. The only way to change them, is to change them system wide. If you like another font for your application only, you have to create your own messagebox form.
-
Aug 23rd, 2000, 11:23 AM
#3
Hyperactive Member
he is right
you could read what the windows settings are and store them.
change the setting.
show the message box
after the user clicks one of the buttons
reset the system.
more work then the message box was intended for IMO
right click on your desktop and select properties.
it is under appearance/message box.
some people would not like you to change this though.
people with disabilities set these for specific reasons, I would not make the assumption that everyone has 20/20 vision.
I am so skeptical, I can hardly believe it!
PS I am not a 'hyperactive member' I am a cool, calm, and collected member 
-
Aug 23rd, 2000, 11:33 AM
#4
Fanatic Member
Why not build your own message box?
Create a form with a label set to the font required, and display it with the required buttons.
I have built such a form, with all the messages I require in a resource file, including formatting details for width, height, font, colour, buttons, htmlhelp refs etc (these are in a CSV type format).
All I do is pass the resource ref no to a function, parse the data, which loads the form modally, displays the required buttons and form properties, and sends back the usual vbYes, vbNo, etc constants when the buttons are clicked.
I have also done the same with a TXText control, with the data in a database. This allows messages to include tables pictures and fully formatted text.
Sorry, though, I cannot send you the source as it is owned by my company!
-
Aug 23rd, 2000, 12:55 PM
#5
If you decide to make your own Message Box, use vbModal to keep the form on top and disable all other forms behind it.
Code:
msgfrm.Show vbModal
-
Aug 23rd, 2000, 01:41 PM
#6
Monday Morning Lunatic
From a completely different thread, I wrote a C++ DLL to 'hook' into the windows MessageBox function. I'm sure I could set the font on that one as well. At the moment all it does is have a custom position. There is source and an example here: http://www.parksie.uklinux.net/customwin.zip
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 23rd, 2000, 02:16 PM
#7
Fanatic Member
I'm writing a kiosk GUI program in VB6.
I had to create my own MessageBox, since the lay-out is very simple of the MsgBox() command.
I used a Form with no borders, created my GUI on it and set it on top of the screen, disabling the owner Form.
The calling procedure "MyMsgBox()" executes a loop combined with the DoEvents statement and checks continuously for a variable's status. It's very simple, considers some attention to the DoEvents statement and is purely written in VB! You can even play a .AVI in your MsgBox!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|