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 / frmwin.frm (.txt) < prev    next >
Visual Basic Form  |  1995-08-14  |  1KB  |  38 lines

  1. VERSION 4.00
  2. Begin VB.Form frmWindow 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   4236
  5.    ClientLeft      =   1092
  6.    ClientTop       =   1512
  7.    ClientWidth     =   6720
  8.    Height          =   4560
  9.    Left            =   1044
  10.    LinkTopic       =   "Form1"
  11.    MDIChild        =   -1  'True
  12.    ScaleHeight     =   4236
  13.    ScaleWidth      =   6720
  14.    Top             =   1236
  15.    Width           =   6816
  16. Attribute VB_Name = "frmWindow"
  17. Attribute VB_Creatable = False
  18. Attribute VB_Exposed = False
  19. Option Explicit
  20. Private mstrIndex As Integer
  21. Public Property Get Index() As String
  22.     Index = mstrIndex
  23. End Property
  24. Public Property Let Index(strIndex As String)
  25.     mstrIndex = strIndex
  26. End Property
  27. ' Register that this is the active window.
  28. Private Sub Form_GotFocus()
  29.     Set modDeclares.gActiveWindow = Windows.Item(Me.Index)
  30. End Sub
  31. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  32.     ' If the user closes the form manually,
  33.     ' be sure to remove it from the collection.
  34.     If UnloadMode = vbFormControlMenu Then
  35.         Windows.Remove Me.Caption
  36.     End If
  37. End Sub
  38.