473,387 Members | 1,790 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,387 software developers and data experts.

Msgbox text font

Hi. I have Access 2003 and I am finding that the font in the text
displayed in Msgbox displays it too small. Is there anyway to increase
the font size of that text?

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
14 25377
Susan,
No, not without changing the OS desktop operating system appearance
settings.

A couple of suggestions;

1) Use uppercase bold characters. The bold switch is two @ signs
separated by a space at the end of the string, like this;

Msgbox UCase("This is my big bold message @ @")

-or-

2) Create a form that looks like a message box. That will give you
more control over the fonts in whatever text boxes you use. Make it
popup, modal, change the border style and remove the close box.

HTH.

Nov 13 '05 #2
Great ideas. Thanks.

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3
"Susan Bricker" wrote
Great ideas. Thanks.


Another alternative is to create your own Form to use instead of the
standard MsgBox, so that you have control over these factors. That is often
done if you want the modal form to close itself after some period of time --
there's no MsgBox argument for that, but you can create a Form with a Timer
and Do It Yourself.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #4
Lyn
"Wolf" <sp*************@hotmail.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
Susan,
No, not without changing the OS desktop operating system appearance
settings.

A couple of suggestions;

1) Use uppercase bold characters. The bold switch is two @ signs
separated by a space at the end of the string, like this;

Msgbox UCase("This is my big bold message @ @")

-or-

2) Create a form that looks like a message box. That will give you
more control over the fonts in whatever text boxes you use. Make it
popup, modal, change the border style and remove the close box.

HTH.


I hadn't heard of the "@ @" trick, so I tried it and it didn't work (A2003).

MsgBox Ucase("My message @ @")

resulted in a non-bold display of:

MY MESSAGE @ @

Am I missing something? (I used the immediate window if that is
significant.)

--
Cheers,
Lyn.
Nov 13 '05 #5
Susan Bricker wrote:
Hi. I have Access 2003 and I am finding that the font in the text
displayed in Msgbox displays it too small. Is there anyway to increase
the font size of that text?

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***


Print Programming in Windows
Jeff Potts
R & D Books, Miller Freeman, Inc.
Lawrence, Kansas 66046
Copyright 2000
ISBN 0-87930-585-1

contains some very interesting ideas about using Windows API functions
to play with fonts. The handle to a window, to a Device Context and to
a font all seem to have wondrous possibilities. I became interested in
these techniques with the hopes of jazzing up the fonts in Access
reports since a user was complaining that she could export a query to
Excel and get the output to look better than an Access report.

An example from the book:
</StartQuote>
Declare Function TextOut Lib "gdi32" Alias "TextOutA" _
(ByVal hdc As Long, ByVal x As Long, ByVal y As Long, _
ByVal lpString As String, ByVal nCount As Long) As Long

There's not much to the routine. Both the x and y parameters specify
the location at which to place the text, the hdc parameter is the
destination device context, lpString is the string of text you want to
print, and cbString holds the number of characters you want to display.
Both the x and y parameters use the measurements specified by
SetMappingMode() when positioning the text. Since we are using the
default setting for coordinate mapping (MM_TEXT), everything will be
measured in device pixels. As with most API routines, a nonzero
indicates a successful call and a zero (or false) indicates some sort
of error. The most common error that could occur when calling this
routine is passing the function an invalid HDC.

....

(Visual Basic)
Sub PrintTextRandom(phdc As Long, hfont As Long, margins As RECT, _
x As Integer, y As Integer, str As String)
Dim oldfont As Long
Dim ret As Long

oldfont = SelectObject(phdc, hfont)
ret = TextOut(phdc, margins.left + x, margins.top, str, Len(str))
ret = SelectObject(phdc, oldfont)
End Sub

As you can see, this function is fairly simple. Basically, I select
the font into the HDC, print the text using TextOut(), and put the
previous font handle back into the HDC. With extensive printing of
text, this method of selecting of the font in-and-out of the HDC coud
degrade performance. On the other hand, it acts as a safeguard against
selecting an object into an HDC and forgetting to put it back. As
we've discussed previously, this is the fast-track to losing system
resources.
</EndQuote>

James A. Fortune

Nov 13 '05 #6
@ @ stopped working somewhere around Access 2000.

It still works in the hidden and undocumented wizmsgbox procedure:

Public Sub blahblah()
With WizHook
.Key = 51488399
.WizMsgBox "Bold Line @ @ Not So Bold Line", _
"The Caption", vbYesNo, 23, "Path To Some Help File"
End With
End Sub

(tested in Access 2002).

Nov 13 '05 #7
Lyn
<ly******@yahoo.ca> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
@ @ stopped working somewhere around Access 2000.

It still works in the hidden and undocumented wizmsgbox procedure:

Public Sub blahblah()
With WizHook
.Key = 51488399
.WizMsgBox "Bold Line @ @ Not So Bold Line", _
"The Caption", vbYesNo, 23, "Path To Some Help File"
End With
End Sub

(tested in Access 2002).

Still works in A2003. Thanks for that, I never knew it existed. Not sure
how/when I would use it either :-)

--
Cheers,
Lyn.
Nov 13 '05 #8

"Lyn" <lh******@iiNet.net.au> wrote in message
news:42**********************@per-qv1-newsreader-01.iinet.net.au...
<ly******@yahoo.ca> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
@ @ stopped working somewhere around Access 2000.

It still works in the hidden and undocumented wizmsgbox procedure:

Public Sub blahblah()
With WizHook
.Key = 51488399
.WizMsgBox "Bold Line @ @ Not So Bold Line", _
"The Caption", vbYesNo, 23, "Path To Some Help File"
End With
End Sub

(tested in Access 2002).

Still works in A2003. Thanks for that, I never knew it existed. Not sure
how/when I would use it either :-)


There's also what MichKa has at
http://www.trigeminal.com/usenet/usenet015.asp

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


Nov 13 '05 #9
Douglas J. Steele wrote:
"Lyn" <lh******@iiNet.net.au> wrote in message
news:42**********************@per-qv1-newsreader-01.iinet.net.au...
<ly******@yahoo.ca> wrote in message
news:11**********************@z14g2000cwz.google groups.com...
@ @ stopped working somewhere around Access 2000.

It still works in the hidden and undocumented wizmsgbox procedure:

Public Sub blahblah()
With WizHook
.Key = 51488399
.WizMsgBox "Bold Line @ @ Not So Bold Line", _
"The Caption", vbYesNo, 23, "Path To Some Help File"
End With
End Sub

(tested in Access 2002).


Still works in A2003. Thanks for that, I never knew it existed. Not sure
how/when I would use it either :-)

There's also what MichKa has at
http://www.trigeminal.com/usenet/usenet015.asp


And of course, good old Eval("Msgbox(""@@blah"")")

--
[OO=00=OO]
Nov 13 '05 #10

"Trevor Best" <no****@besty.org.uk> wrote in message
news:42**********************@news.zen.co.uk...
There's also what MichKa has at
http://www.trigeminal.com/usenet/usenet015.asp


And of course, good old Eval("Msgbox(""@@blah"")")


Which is, of course, the gist of MichKa's suggestion...

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


Nov 13 '05 #11
Lyn
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:hN********************@rogers.com...

"Lyn" <lh******@iiNet.net.au> wrote in message
news:42**********************@per-qv1-newsreader-01.iinet.net.au...
<ly******@yahoo.ca> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
@ @ stopped working somewhere around Access 2000.

It still works in the hidden and undocumented wizmsgbox procedure:

Public Sub blahblah()
With WizHook
.Key = 51488399
.WizMsgBox "Bold Line @ @ Not So Bold Line", _
"The Caption", vbYesNo, 23, "Path To Some Help File"
End With
End Sub

(tested in Access 2002).

Still works in A2003. Thanks for that, I never knew it existed. Not
sure how/when I would use it either :-)


There's also what MichKa has at
http://www.trigeminal.com/usenet/usenet015.asp

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

Interesting. I have had a bit of a play with both WizMsgBox and
FormattedMsgBox. If you use "@ @" in both, they seem to behave the same way
(text prior to the "@ @" in bold, then four line feeds to the remaining
text -- also a limit on the length of subsequent text). But using a single
"@" only works in FormattedMsgBox (text prior to the first "@" in bold, two
line feeds after each "@", but again with a limit to the total number of
lines).

On balance, FormattedMsgBox seems to be a bit more flexible.

--
Cheers,
Lyn.
Nov 13 '05 #12
ly******@yahoo.ca wrote:
@ @ stopped working somewhere around Access 2000.

It still works in the hidden and undocumented wizmsgbox procedure:

Public Sub blahblah()
With WizHook
.Key = 51488399
.WizMsgBox "Bold Line @ @ Not So Bold Line", _
"The Caption", vbYesNo, 23, "Path To Some Help File"
End With
End Sub

(tested in Access 2002).


What's the significance of the .Key property?

--
[OO=00=OO]
Nov 13 '05 #13
Lyn wrote:

Interesting. I have had a bit of a play with both WizMsgBox and
FormattedMsgBox. If you use "@ @" in both, they seem to behave the same way
(text prior to the "@ @" in bold, then four line feeds to the remaining
text -- also a limit on the length of subsequent text). But using a single
"@" only works in FormattedMsgBox (text prior to the first "@" in bold, two
line feeds after each "@", but again with a limit to the total number of
lines).

On balance, FormattedMsgBox seems to be a bit more flexible.


There is one drawback with both these methods and an extra bonus.

The bonus is that they support different alphabets, I use the Eval
method (as in Michka's FormattedMsgBox) to enable me to tell the Ruskis
they typed something in wrong :-) The standard (interaction.) msgbox
would display garbage when sent cyrillic text. (Well, actually I haven't
tested the Wizhook with a different alphabet)

The con is that the standard msgbox when displayed, you can hit Ctrl+C
and it copies the text of the messagebox, using the alternative ones,
this doesn't happen.

That functionality is useful for getting users to email me an error
message rather than having to copy it down manually (error prone) or
Alt-PrntScrn and send an image (some users have problems doing that).

Although I can look in their error logs to get the message (wading
through a load of them) it's just not as easy as them hitting Ctrl+C
then pasting that into an email.

--
[OO=00=OO]
Nov 13 '05 #14
It identifies the user as a wizard, thus permitting the subsequent call
of WizMsgBox.
Use
..Key = "Condola"
for witch.

Nov 13 '05 #15

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

Similar topics

12
by: Marc Jennings | last post by:
Hi, I have a problem with the message text and button text not showing up in a messagebox. (See attachment) The code I used to call this example was > MessageBox.Show(this,"Hello","nothing...
4
by: Arif Çimen | last post by:
Hi to everybody, I have chnged a button text in design mode. But After compiling and executing the program the text of the button do not change to new value. Any Ideas? Thaks for helps.
1
by: CharlieChau | last post by:
How can I change the size to the text in the msgbox in winform. my application does not use the web or vb script. Thanks, /CC.
4
by: | last post by:
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...
10
by: Betina Andersen | last post by:
I have inherited a VB.NET dll that I am using from common asp. My problem is to get the messages from the dll to the Ie client, I can see the messages in the Eventlog on the IIS server so I know...
13
by: =?Utf-8?B?S2VzdGZpZWxk?= | last post by:
Hi Our company has a .Net web service that, when called via asp.net web pages across our network works 100%! The problem is that when we try and call the web service from a remote machine, one...
3
by: MLH | last post by:
Without modifying the default font settings everywhere, is there any way to specify it for just message boxes? MsgBox "I would like this text to be larger for all message boxes." ???
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...
7
by: kirkgilbert | last post by:
I am trying to do an onchange event in a form using a text field. The form is tied to a record set that is part of a repeated region. One the first record when I edit the data it works perfectly. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.