ArcPad Scripting Object Model
ShowFont Method
See Also  Example  Send comments on this topic.
pFont
Required. A variable declared as a Font object.
CommonDialog Object : ShowFont Method

Glossary Item Box

Description

Displays the Font dialog box.

Syntax

object.ShowFont ( pFont )

Parameters

pFont
Required. A variable declared as a Font object.

Return Type

Boolean

Remarks

The ShowFont method returns True if the OK button was pressed in the Font dialog and False if the Cancel button was pressed.

Example

Allows the user to select a font and displays the font details.
ShowFont Example (VBScript)Copy Code
Sub ShowFont
      Dim pFont, blnOK
      Set pFont = Application.CreateAppObject ("font")
      
      blnOK = CommonDialog.ShowFont (pFont)
      If blnOK Then
            MsgBox "Here are the details of the font you selected:" & vbCrlf & _
                        "Bold: " & pFont.Bold & vbCrlf & _
                        "Charset: " & pFont.Charset & vbCrlf & _
                        "Italic: " & pFont.Italic & vbCrlf & _
                        "Name: " & pFont.Name & vbCrlf & _
                        "Size: " & pFont.Size & vbCrlf & _
                        "Strikethrough: " & pFont.StrikeThrough & vbCrlf & _
                        "Underlined: " & pFont.Underline & vbCrlf & _
                        "Weight: " & pFont.Weight, vbInformation, "Font details"
      Else
            MsgBox "No font selected.  The Cancel button was pushed.", vbInformation, "No font selected"
      End If
End Sub

See Also

© 2013 All Rights Reserved.