home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Programmer'…arterly (Limited Edition) / Visual_Basic_Programmers_Journal_VB-CD_Quarterly_Limited_Edition_1995.iso / code / ch19code / applicat.cls next >
Text File  |  1995-08-14  |  2KB  |  85 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "Application"
  6. Attribute VB_Creatable = True
  7. Attribute VB_Exposed = True
  8. Option Explicit
  9. Public NewVar As Collection
  10.  
  11. ' Application ActiveWindow property (read only)
  12. Public Property Get ActiveWindow() As Window
  13.     Set ActiveWindow = modDeclares.gActiveWindow
  14. End Property
  15.  
  16. Public Property Get Name() As String
  17.     Name = App.Title
  18. End Property
  19.  
  20.  
  21. ' Application Windows method.
  22. Public Function Windows() As Object
  23.     ' Return the Windows variable from the
  24.     ' modDeclares module.
  25.     Set Windows = modDeclares.Windows
  26. End Function
  27.  
  28. ' Application object Application property
  29. Public Property Get Application()
  30.     Set Application = Me
  31. End Property
  32.  
  33. #If Win16 Then
  34. Public Property Get hWnd() As Integer
  35. #Else
  36. Public Property Get hWnd() As Long
  37. #End If
  38.     hWnd = mdiApplication.hWnd
  39. End Property
  40. ' Application object Parent property
  41. Public Property Get Parent()
  42.     Set Parent = Me
  43. End Property
  44.     
  45. ' Application window height property (read/write).
  46. Public Property Let Height(iVal As Integer)
  47.     mdiApplication.Height = iVal
  48. End Property
  49.  
  50. Public Property Get Height() As Integer
  51.     Height = mdiApplication.Height
  52. End Property
  53.  
  54. ' Application window width property (read/write).
  55. Public Property Let Width(iVal As Integer)
  56.     mdiApplication.Width = iVal
  57. End Property
  58.  
  59. Public Property Get Width() As Integer
  60.     Width = mdiApplication.Width
  61. End Property
  62.  
  63. ' Application window top property (read/write).
  64. Public Property Let Top(iVal As Integer)
  65.     mdiApplication.Top = iVal
  66. End Property
  67.  
  68. Public Property Get Top() As Integer
  69.     Top = mdiApplication.Top
  70. End Property
  71.  
  72. ' Application window Left property (read/write).
  73. Public Property Let Left(iVal As Integer)
  74.     mdiApplication.Left = iVal
  75. End Property
  76.  
  77. Public Property Get Left() As Integer
  78.     Left = mdiApplication.Left
  79. End Property
  80.  
  81. ' Selection method.
  82. Public Function Selection() As Collection
  83.     'Set Selection = modDeclares.Selection
  84. End Function
  85.