Export (0) Print
Expand All
Expand Minimize

Using the Same Font as Visio in Your Solution Dialog Boxes

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
 

Microsoft Corporation

October 2001

Applies to
   Microsoft Visio Standard 2002
   Microsoft Visio Professional 2002

Summary: This article discusses using the new Microsoft Visio 2002 DialogFont property to make your solution dialog boxes look like Visio dialog boxes. (2 printed pages)

Contents Introduction
Make Your Dialog Boxes Look Like Visio Dialog Boxes
Additional Information

Introduction

When you create a custom solution for Microsoft® Visio®, you usually want to integrate it as tightly as possible with Visio. One aspect of that integration is making your solution dialog boxes look like Visio dialog boxes so users can jump right in and use your solution without learning a new interface. To find out which font Visio is using, you can use the new DialogFont property.

Make Your Dialog Boxes Look Like Visio Dialog Boxes

COM provides a standard implementation of a font object with the IFontDisp interface, which exposes a font object's properties and is implemented in the stdole type library as a StdFont object creatable within Microsoft Visual Basic®.

Note   The stdole type library is automatically referenced from all Visual Basic for Applications projects in Visio.

To find out what font Visio is using in its dialog boxes, you can use the StdFont object and the DialogFont property to print the font information to the Immediate window, as shown in the following example.

Sub WhatFont()
Dim oStdFont As StdFont
Set oStdFont = Application.DialogFont

With oStdFont
Debug.Print .Bold
Debug.Print .CharSet
Debug.Print .Italic
Debug.Print .Name
Debug.Print .Size
Debug.Print .Strikethrough
Debug.Print .Underline
Debug.Print .Weight
End With

End Sub

Additional Information

For more information about the StdFont object, view the stdole type library in the Object Browser (Visual Basic Editor), and then examine the StdFont class.

Show:
© 2014 Microsoft