I have a very basic Windows based .net application in which I have used messageboxes. How can I determine/know the font of the messageboxes ?
OS used : Windows Server 2008 r2
.NET ProgrammingWindows OSFonts Typography
Last Comment
ankurdk
8/22/2022 - Mon
David Johnson, CD
do you have the source code? if so open the solution in Visual Studio. click on the control and look at its properties.
AndyAinscow
That should be a system setting for a standard message box. You can look at the font settings to determine which it is.
Fernando Soto
Hi ankurdk;
The MessageBox only has a few properties that are available to be set or gotten but the Font is not one of them. So in answer to your question you can't. If you need that functionality you will need to create your own dialog box.
If you used MessageBox.Show method and did not have your own custom message boxes or (any other mechanism to override default system behavior) - your messagebox would use the fonts defined by the system.
Regards,
Chinmay.
Don VonderBurg
The standard MessageBox has limited settings. I wrote my own MessageBox routine and use that in all cases. I have more control that way.
ankurdk
ASKER
Thanks All for your insights. As precisely put by @Darren, there is a property SystemFonts.MessageBoxFont which does give the name of the font (in this case it is Tahoma) using the following VB.NET code :