home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmXTALUDL_DEMO
- Caption = "XTALUDL Demo"
- ClientHeight = 1800
- ClientLeft = 1095
- ClientTop = 1485
- ClientWidth = 3420
- Height = 2205
- Left = 1035
- LinkTopic = "Form1"
- ScaleHeight = 1800
- ScaleWidth = 3420
- Top = 1140
- Width = 3540
- Begin TextBox txtXTALUDL_Status
- Height = 300
- Left = 1890
- TabIndex = 1
- Top = 975
- Width = 1050
- End
- Begin CommandButton Command1
- Caption = "Update Report File"
- Height = 390
- Left = 660
- TabIndex = 0
- Top = 285
- Width = 2055
- End
- Begin Label Label2
- Caption = "(Status visible for demo)"
- Height = 270
- Left = 615
- TabIndex = 3
- Top = 1485
- Width = 2190
- End
- Begin Label Label1
- AutoSize = -1 'True
- Caption = "XTALUDL Status:"
- Height = 195
- Left = 240
- TabIndex = 2
- Top = 1020
- Width = 1515
- End
- Option Explicit
- ' XTAL User Defined Labels Demo
- ' Programmed by Robert J. Johnston, Burlingame, CA.
- ' Last Update 8/14/93
- ' XTALUDL.EXE
- ' Programmed by Robert J. Johnston, Burlingame, CA.
- ' Last Update 8/14/93
- Sub Command1_Click ()
- Dim p As String
- Dim x As Integer
- ' I'm assuming that XTALUDL.EXE is in same directory
- ' as your app.
- p = app.Path
- If Right$(p, 1) <> "\" Then
- p = p & "\"
- End If
- p = p & "XTALUDL.EXE"
- x = Shell(p, 1) 'XTALUDL form is beyond right edge of screen.
- x = DoEvents()
- AppActivate "XTALUDL"
- SendKeys "I~" 'Initialize command
- 'Wait until initialization complete
- txtXTALUDL_Status.LinkMode = 0
- txtXTALUDL_Status.LinkTopic = "XTALUDL|form1"
- txtXTALUDL_Status.LinkItem = "lblStatus"
- txtXTALUDL_Status.LinkMode = 2
- Do
- txtXTALUDL_Status.LinkRequest
- Loop Until txtXTALUDL_Status.Text = ""
- '----------------------------------------------------
- 'The information between the lines is what you will
- 'have to create yourself based on information supplied
- 'by your users.
- 'First character is command:
- SendKeys "Pf:\ha4qtest\x5.rpt~" 'full Path of report
- SendKeys "L0.25~" 'Left margin
- SendKeys "R0.25~" 'Right margin
- SendKeys "T0.25~" 'Top margin
- SendKeys "B0.25~" 'Bottom margin
- SendKeys "W1.00~" 'label Width
- SendKeys "H1.00~" 'label Height
- SendKeys "Z0.50~" 'horiZontal Gap
- SendKeys "V0.50~" 'Vertical gap
- SendKeys "DD~" 'Direction: D=DOWN A=ACROSS
- '----------------------------------------------------
- SendKeys "X~" 'eXecute
- ' Wait until report file is updated by XTALUDL
- txtXTALUDL_Status.LinkMode = 0
- txtXTALUDL_Status.LinkTopic = "XTALUDL|form1"
- txtXTALUDL_Status.LinkItem = "lblStatus"
- txtXTALUDL_Status.LinkMode = 2
- Do
- txtXTALUDL_Status.LinkRequest
- Loop While txtXTALUDL_Status.Text = "" 'Holds error code. "0" if no error.
- ' Unload XTALUDL.EXE"
- AppActivate "XTALUDL"
- SendKeys "U" 'Unload command. This is
- 'the only command without
- 'a tilde ~. Infinite loop
- 'if you put one in.
- ' Make sure to check txtXTALUDL_Status.text for error code.
- End Sub
-