home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmDemoDLL
- Caption = "XTAL.DLL Demo"
- ClientHeight = 4020
- ClientLeft = 105
- ClientTop = 690
- ClientWidth = 7365
- Height = 4710
- Left = 45
- LinkTopic = "Form2"
- ScaleHeight = 4020
- ScaleWidth = 7365
- Top = 60
- Width = 7485
- Begin CommonDialog CMDialog1
- CancelError = -1 'True
- Left = 135
- Top = 3405
- End
- Begin Label Label1
- Caption = "Warning: All changes are made to the original file. Make sure you have backed up your reports."
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 1275
- Left = 1695
- TabIndex = 0
- Top = 450
- Width = 3405
- WordWrap = -1 'True
- End
- Begin Menu mnuDemo
- Caption = "&Demo"
- Begin Menu mnuGetLabelDimensions
- Caption = "&Label Dimensions..."
- End
- Begin Menu mnuGetReportDescriptions
- Caption = "&Report Title..."
- End
- Begin Menu mnuSetFaceName
- Caption = "&Font..."
- End
- Begin Menu sep1
- Caption = "-"
- End
- Begin Menu mnuExit
- Caption = "E&xit"
- End
- End
- Option Explicit
- Sub Form_Unload (Cancel As Integer)
- Unload frmReadDescriptions
- Unload frmGetSetDimen
- End Sub
- Sub mnuExit_Click ()
- Unload frmDemoDLL
- End Sub
- Sub mnuGetLabelDimensions_Click ()
- frmGetSetDimen.Show 1
- End Sub
- Sub mnuGetReportDescriptions_Click ()
- frmReadDescriptions.Show 1
- End Sub
- Sub mnuSetFaceName_Click ()
- Dim saveErr As Integer
- Dim fontFace As String
- Dim nFontSize As Integer
- Dim report As String
- Dim errcode As Integer
- On Error Resume Next
- cmdialog1.FontName = ""
- cmdialog1.FontSize = 0
- cmdialog1.Flags = CF_PRINTERFONTS
- cmdialog1.Action = DLG_FONT
- saveErr = Err
- On Error GoTo 0
- If saveErr <> 0 Then Exit Sub
- MsgBox "Reminder: Font Style is not used.", 32
- fontFace = cmdialog1.FontName
- nFontSize = cmdialog1.FontSize
- cmdialog1.DialogTitle = "Select Report To Modify"
- cmdialog1.Filename = ""
- cmdialog1.Filter = "Reports (*.rpt) | *.rpt "
- cmdialog1.FilterIndex = 1
- cmdialog1.Flags = OFN_PATHMUSTEXIST
- On Error Resume Next
- cmdialog1.Action = DLG_FILE_OPEN
- saveErr = Err
- On Error GoTo 0
- If saveErr <> 0 Then Exit Sub
- mousepointer = 11
- report = cmdialog1.Filename
- SetFontAll report, fontFace, nFontSize, errcode
- If errcode Then MsgBox Str$(errcode)
- mousepointer = 0
- End Sub
-