home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / source / chap16 / dlgrun2 / runclass.cls < prev   
Encoding:
Text File  |  1995-10-05  |  736 b   |  39 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "RunClass"
  6. Attribute VB_Creatable = False
  7. Attribute VB_Exposed = False
  8. Option Explicit
  9.  
  10. Private dlg As New dlgRun
  11.  
  12.  
  13. Public Property Get CommandLine() As Variant
  14.     CommandLine = dlg.CommandLine
  15. End Property
  16.  
  17. Public Function Execute() As Variant
  18.     Dim varHolder As Variant
  19.     varHolder = dlg.Execute
  20.     If VarType(varHolder) = vbError Then
  21.         Execute = False
  22.     Else
  23.         Execute = varHolder
  24.     End If
  25. End Function
  26.  
  27. Public Function Run() As Variant
  28.     Run = dlg.Display
  29. End Function
  30.  
  31. Private Sub Class_Initialize()
  32.     Load dlg
  33. End Sub
  34.  
  35. Private Sub Class_Terminate()
  36.     Unload dlg
  37.     Set dlg = Nothing
  38. End Sub
  39.