472,352 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,352 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 25109
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...
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...
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...
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...
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...
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...
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...
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...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.