473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

MsgBox formatting.

I have about 20 MsgBox occurance in by program, which I use to inform the
user of the progress of the program, or ask confirmation of an action, or
simply to act separators to various parts of the program.

They all vary in size and shape depending on the text length.

To make the looks of the program more consistant, I made the FIRST and LAST
line a series of "======" 65 characters long.

Windows displays Message Box text using a font defined by the user's
"Appearance" settings, and most users probably have the default Tacoma 8pt
or some other proportional space font installed.

l loaded the text into Word and centered each line of text to the length of
the top and bottom lines by padding each line with leading blank spaces.

I then pasted each line, including the spaces, between the quotes framing my
text in the MsgBox code.

Now all msgboxes displayed the same width, and each line of text is
centered and looks great! .
One of my beta testers had set his display to use "Large Fonts" and both
of the ===== lines wrapped onto the next line as did the longest line
of text.

Is there any way to format the text in a MsgBox so that it uses a font and
font size of my choosing, instead of the user's system preferences.
Alternately, is there any way to know the maximum size line that will not be
wrapped in any screen resolution and font size.

........joisey
Nov 21 '05 #1
4 6864
Joisey,
Is there any way to format the text in a MsgBox so that it uses a font and
font size of my choosing, instead of the user's system preferences.
I would recommend creating a custom form that appears similar to a Message
box, yet allows you to control the font, size & centered text. You could
also include rules (lines) on the form rather then attempt to fake them with
a string of equal signs or hyphens...

As MessageBox itself was designed to display "simple" text left justified in
a proportional font.

Hope this helps
Jay

<jo****@mindspring.com> wrote in message
news:Os****************@TK2MSFTNGP10.phx.gbl...I have about 20 MsgBox occurance in by program, which I use to inform the
user of the progress of the program, or ask confirmation of an action, or
simply to act separators to various parts of the program.

They all vary in size and shape depending on the text length.

To make the looks of the program more consistant, I made the FIRST and
LAST line a series of "======" 65 characters long.

Windows displays Message Box text using a font defined by the user's
"Appearance" settings, and most users probably have the default Tacoma 8pt
or some other proportional space font installed.

l loaded the text into Word and centered each line of text to the length
of the top and bottom lines by padding each line with leading blank
spaces.

I then pasted each line, including the spaces, between the quotes framing
my text in the MsgBox code.

Now all msgboxes displayed the same width, and each line of text is
centered and looks great! .
One of my beta testers had set his display to use "Large Fonts" and both
of the ===== lines wrapped onto the next line as did the longest
line of text.

Is there any way to format the text in a MsgBox so that it uses a font and
font size of my choosing, instead of the user's system preferences.
Alternately, is there any way to know the maximum size line that will not
be wrapped in any screen resolution and font size.

.......joisey

Nov 21 '05 #2
Is there a simple way to capture the destination machines screen
chracteristics?

Particulary, to find ouf if the DpI stetting in Properties>Settings>advanced
set to large fonts(120dpi) or normal(96dpi).

Is there a simple way to capture the font and size the user's machine has
set for diplay of message boxes.

If my program "Knew" this, it could adjust line length and centering "on the
fly"

I know I could design forms to replace the message boxes, but there are
about 20 of them, this problem of bad formatting when a user has large fonts
just came up, and the product is due to go comercial this weekend,. I have
limited time since I still have a 10 hr day job.

.....joisey



<jo****@mindspring.com> wrote in message
news:<Os**************@TK2MSFTNGP10.phx.gbl>...
I have about 20 MsgBox occurance in by program, which I use to inform the user of the progress of the program, or ask confirmation of an action, or simply to act separators to various parts of the program. They all vary in size and shape depending on the text length. To make the looks of the program more consistant, I made the FIRST and
LAST line a series of "======" 65 characters long. Windows displays Message Box text using a font defined by the user's "Appearance" settings, and most users probably have the default Tacoma 8pt or some other proportional space font installed. l loaded the text into Word and centered each line of text to the length
of the top and bottom lines by padding each line with leading blank spaces. I then pasted each line, including the spaces, between the quotes framing
my text in the MsgBox code. Now all msgboxes displayed the same width, and each line of text is centered and looks great! . One of my beta testers had set his display to use "Large Fonts" and both of the ===== lines wrapped onto the next line as did the longest line of text. Is there any way to format the text in a MsgBox so that it uses a font and font size of my choosing, instead of the user's system preferences. Alternately, is there any way to know the maximum size line that will not
be wrapped in any screen resolution and font size. .......joisey
<jo****@mindspring.com> wrote in message
news:Os****************@TK2MSFTNGP10.phx.gbl...I have about 20 MsgBox occurance in by program, which I use to inform the
user of the progress of the program, or ask confirmation of an action, or
simply to act separators to various parts of the program.

They all vary in size and shape depending on the text length.

To make the looks of the program more consistant, I made the FIRST and
LAST line a series of "======" 65 characters long.

Windows displays Message Box text using a font defined by the user's
"Appearance" settings, and most users probably have the default Tacoma 8pt
or some other proportional space font installed.

l loaded the text into Word and centered each line of text to the length
of the top and bottom lines by padding each line with leading blank
spaces.

I then pasted each line, including the spaces, between the quotes framing
my text in the MsgBox code.

Now all msgboxes displayed the same width, and each line of text is
centered and looks great! .
One of my beta testers had set his display to use "Large Fonts" and both
of the ===== lines wrapped onto the next line as did the longest
line of text.

Is there any way to format the text in a MsgBox so that it uses a font and
font size of my choosing, instead of the user's system preferences.
Alternately, is there any way to know the maximum size line that will not
be wrapped in any screen resolution and font size.

.......joisey

Nov 21 '05 #3
Joisey,
My suggestion was to design a single form to replace the single MessageBox
form.

Your single form would look at the size of the text & adjust the size of the
form appropriately.

This single MessageBox replacement form should be little more then a Form, 3
buttons, a PictureBox, and a Label. Plus code to set the various controls
appropriately.

I used a MessageBox replacement in one project that used a Grid to display
the list of Errors that ADO returns...

I will see about creating a simplier sample later today.

Hope this helps
Jay

<jo****@mindspring.com> wrote in message
news:uz**************@TK2MSFTNGP10.phx.gbl...
Is there a simple way to capture the destination machines screen
chracteristics?

Particulary, to find ouf if the DpI stetting in
Properties>Settings>advanced set to large fonts(120dpi) or normal(96dpi).

Is there a simple way to capture the font and size the user's machine has
set for diplay of message boxes.

If my program "Knew" this, it could adjust line length and centering "on
the fly"

I know I could design forms to replace the message boxes, but there are
about 20 of them, this problem of bad formatting when a user has large
fonts just came up, and the product is due to go comercial this weekend,.
I have limited time since I still have a 10 hr day job.

....joisey



<jo****@mindspring.com> wrote in message
news:<Os**************@TK2MSFTNGP10.phx.gbl>...
I have about 20 MsgBox occurance in by program, which I use to inform the

user of the progress of the program, or ask confirmation of an action, or

simply to act separators to various parts of the program.


They all vary in size and shape depending on the text length.


To make the looks of the program more consistant, I made the FIRST and
LAST

line a series of "======" 65 characters long.


Windows displays Message Box text using a font defined by the user's

"Appearance" settings, and most users probably have the default Tacoma
8pt

or some other proportional space font installed.


l loaded the text into Word and centered each line of text to the length
of

the top and bottom lines by padding each line with leading blank spaces.


I then pasted each line, including the spaces, between the quotes framing
my

text in the MsgBox code.


Now all msgboxes displayed the same width, and each line of text is

centered and looks great! .



One of my beta testers had set his display to use "Large Fonts" and both

of the ===== lines wrapped onto the next line as did the longest line

of text.


Is there any way to format the text in a MsgBox so that it uses a font
and

font size of my choosing, instead of the user's system preferences.



Alternately, is there any way to know the maximum size line that will not
be

wrapped in any screen resolution and font size.


.......joisey



<jo****@mindspring.com> wrote in message
news:Os****************@TK2MSFTNGP10.phx.gbl...
I have about 20 MsgBox occurance in by program, which I use to inform the
user of the progress of the program, or ask confirmation of an action, or
simply to act separators to various parts of the program.

They all vary in size and shape depending on the text length.

To make the looks of the program more consistant, I made the FIRST and
LAST line a series of "======" 65 characters long.

Windows displays Message Box text using a font defined by the user's
"Appearance" settings, and most users probably have the default Tacoma
8pt or some other proportional space font installed.

l loaded the text into Word and centered each line of text to the length
of the top and bottom lines by padding each line with leading blank
spaces.

I then pasted each line, including the spaces, between the quotes framing
my text in the MsgBox code.

Now all msgboxes displayed the same width, and each line of text is
centered and looks great! .
One of my beta testers had set his display to use "Large Fonts" and
both of the ===== lines wrapped onto the next line as did the
longest line of text.

Is there any way to format the text in a MsgBox so that it uses a font
and font size of my choosing, instead of the user's system preferences.
Alternately, is there any way to know the maximum size line that will not
be wrapped in any screen resolution and font size.

.......joisey


Nov 21 '05 #4
Joisey,
Here is a recent post on www.codeproject.com that describes "what goes into
creating a message box"

The sample is in C#, however it should be usable as is, or easily converted
to VB.NET.

http://www.codeproject.com/cs/miscctrl/MessageBoxEx.asp

The added advantage of MessageBoxEx is it allows you to add "questions"
(checkboxes) to the Message Box displayed.

Hope this helps
Jay
<jo****@mindspring.com> wrote in message
news:uz**************@TK2MSFTNGP10.phx.gbl...
Is there a simple way to capture the destination machines screen
chracteristics?

Particulary, to find ouf if the DpI stetting in
Properties>Settings>advanced set to large fonts(120dpi) or normal(96dpi).

Is there a simple way to capture the font and size the user's machine has
set for diplay of message boxes.

If my program "Knew" this, it could adjust line length and centering "on
the fly"

I know I could design forms to replace the message boxes, but there are
about 20 of them, this problem of bad formatting when a user has large
fonts just came up, and the product is due to go comercial this weekend,.
I have limited time since I still have a 10 hr day job.

....joisey



<jo****@mindspring.com> wrote in message
news:<Os**************@TK2MSFTNGP10.phx.gbl>...
I have about 20 MsgBox occurance in by program, which I use to inform the

user of the progress of the program, or ask confirmation of an action, or

simply to act separators to various parts of the program.


They all vary in size and shape depending on the text length.


To make the looks of the program more consistant, I made the FIRST and
LAST

line a series of "======" 65 characters long.


Windows displays Message Box text using a font defined by the user's

"Appearance" settings, and most users probably have the default Tacoma
8pt

or some other proportional space font installed.


l loaded the text into Word and centered each line of text to the length
of

the top and bottom lines by padding each line with leading blank spaces.


I then pasted each line, including the spaces, between the quotes framing
my

text in the MsgBox code.


Now all msgboxes displayed the same width, and each line of text is

centered and looks great! .



One of my beta testers had set his display to use "Large Fonts" and both

of the ===== lines wrapped onto the next line as did the longest line

of text.


Is there any way to format the text in a MsgBox so that it uses a font
and

font size of my choosing, instead of the user's system preferences.



Alternately, is there any way to know the maximum size line that will not
be

wrapped in any screen resolution and font size.


.......joisey



<jo****@mindspring.com> wrote in message
news:Os****************@TK2MSFTNGP10.phx.gbl...
I have about 20 MsgBox occurance in by program, which I use to inform the
user of the progress of the program, or ask confirmation of an action, or
simply to act separators to various parts of the program.

They all vary in size and shape depending on the text length.

To make the looks of the program more consistant, I made the FIRST and
LAST line a series of "======" 65 characters long.

Windows displays Message Box text using a font defined by the user's
"Appearance" settings, and most users probably have the default Tacoma
8pt or some other proportional space font installed.

l loaded the text into Word and centered each line of text to the length
of the top and bottom lines by padding each line with leading blank
spaces.

I then pasted each line, including the spaces, between the quotes framing
my text in the MsgBox code.

Now all msgboxes displayed the same width, and each line of text is
centered and looks great! .
One of my beta testers had set his display to use "Large Fonts" and
both of the ===== lines wrapped onto the next line as did the
longest line of text.

Is there any way to format the text in a MsgBox so that it uses a font
and font size of my choosing, instead of the user's system preferences.
Alternately, is there any way to know the maximum size line that will not
be wrapped in any screen resolution and font size.

.......joisey


Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
2
by: dchow | last post by:
I would like to highlight (say make it bold) a couple of words in a Msgbox. Is it possible? Similarly, how can I change the caption of a label with highlighted text?
4
by: ColinWard | last post by:
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
2
by: Colleyville Alan | last post by:
I am using Access and have embedded the ActiveX control Formula One that came with Office 2000. (ver 3.04). I have created and formatted a spreadsheet and now I want to copy the info with...
4
by: DBQueen | last post by:
I have a subform which is in Continuous Forms view. I have added a button to the bottom of the page to move to the next record using the button wizard (result: DoCmd.GoToRecord , , acNext). I...
3
by: GGerard | last post by:
Hello Does anyone know if it is possible to have Bold letters in a MsgBox and if so how would that be done? Thanks G.Gerard
3
by: Paolo | last post by:
I am trying to have a message box where the message goes onto a second line My book is for Access 2000 and I am using 2002. I have tried using the @ sign but it's not working.... Any...
2
by: GB | last post by:
Hello: Is it possible to make formatting of MsgBox and InputBox in sence of fonts, size, etc. ? Thanks, GB
2
by: manikschumi | last post by:
Hello people (VBA related) Some help please. Is there any text formatting that I can do with the text that I want displayed in the MsgBox...bold, a different font and font size is what I am looking...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.