SWchars: Visual Basic Version


'*****************************************************************************
'                                                                            *
'  SWchars.frm                                                               *
'                                                                            *
'  This program displays all characters in the Fastgraph for Windows primary *
'  and alternate software fonts.                                             *
'                                                                            *
'*****************************************************************************
Const vbWidth = 640
Const vbHeight = 480
Dim hPal As Long
Dim hVB As Long
Dim xDest As Long, yDest As Long
Private Sub Form_Activate()
   Call fg_realize(hPal)
   Refresh
End Sub
Private Sub Form_Load()
   ScaleMode = 3
   Call fg_setdc(hDC)
   hPal = fg_defpal()
   Call fg_realize(hPal)
   Call fg_vbinit
   hVB = fg_vballoc(vbWidth, vbHeight)
   Call fg_vbopen(hVB)
   Call fg_vbcolors
   Call fg_initw
   Call fg_setworld(0#, 6.39, 0#, 4.79)
   Call fg_setsizew(0.2)
   Call fg_setcolor(25)
   Call fg_fillpage
   Call fg_setcolor(19)
   Call fg_movew(3.2, 4.2)
   Call fg_swchar("Software characters - font 1", 28, 0)
   Call fg_setcolor(10)
   Call fg_movew(0.5, 3.9)
   Call fg_swchar("ABCDEFGHIJKLMNOPQRSTUVWXYZ", 26, -1)
   Call fg_movew(0.5, 3.6)
   Call fg_swchar("abcdefghijklmnopqrstuvwxyz", 26, -1)
   Call fg_movew(0.5, 3.3)
   Call fg_swchar("0123456789", 10, -1)
   Call fg_movew(0.5, 3#)
   Call fg_swchar("!""#$%&='()*+,-./:;<=>?[]^`{|}~", 29, -1)
   Call fg_setcolor(19)
   Call fg_movew(3.2, 2.5)
   Call fg_swchar("Software characters - font 2", 28, 0)
   Call fg_setcolor(10)
   Call fg_movew(0.5, 2.2)
   Call fg_swchar("\ABCDEFGHIJKLMNOPRSTUWXYZ", 25, -1)
   Call fg_movew(0.5, 1.9)
   Call fg_swchar("\abcdefghijklmnoprstuwxyz", 25, -1)
   Call fg_movew(0.5, 1.3)
   Call fg_swchar("\012345678#$%&()*+/<=>?[]{}", 27, -1)
   Call fg_setratio(1.2)
   Call fg_movew(0.5, 0.6)
   Call fg_swchar("cos\^2\h\+sin\^2\h\=1", 21, -1)
   Call fg_movew(5.9, 0.6)
   Call fg_swchar("H\v2O U\v2\v3\v2", 16, 1)
   Call fg_setratio(1#)
   Call fg_movew(3.2, 0.2)
   Call fg_swchar("One _word_ is underlined.", 25, 0)
   Call fg_setcolor(19)
   Call fg_movew(0#, 2.8)
   Call fg_draww(6.39, 2.8)
   Call fg_movew(0#, 0.9)
   Call fg_draww(6.39, 0.9)
End Sub
Private Sub Form_Paint()
   Call fg_vbpaste(0, vbWidth - 1, 0, vbHeight - 1, xDest, yDest)
End Sub
Private Sub Form_Resize()
   xDest = (ScaleWidth - vbWidth) / 2
   yDest = (ScaleHeight - vbHeight) / 2
   If xDest < 0 Then xDest = 0
   If yDest < 0 Then yDest = 0
   yDest = (ScaleHeight - 1) - yDest
   Refresh
End Sub
Private Sub Form_Unload(Cancel As Integer)
   Call fg_vbclose
   Call fg_vbfree(hVB)
   Call fg_vbfin
End Sub

<< Prev

Next >>

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.