home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / 500forms / form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-09-15  |  1.6 KB  |  55 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Hang On"
  5.    ClientHeight    =   1005
  6.    ClientLeft      =   45
  7.    ClientTop       =   285
  8.    ClientWidth     =   3750
  9.    ControlBox      =   0   'False
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   1005
  14.    ScaleWidth      =   3750
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin VB.Timer Timer1 
  18.       Enabled         =   0   'False
  19.       Interval        =   1
  20.       Left            =   360
  21.       Top             =   360
  22.    End
  23. Attribute VB_Name = "Form1"
  24. Attribute VB_GlobalNameSpace = False
  25. Attribute VB_Creatable = False
  26. Attribute VB_PredeclaredId = True
  27. Attribute VB_Exposed = False
  28. Option Explicit
  29. ' This is an instance example I wrote
  30. ' and that I do not warrant.
  31. ' Tim Kessler
  32. ' See module1 for more instructions
  33. Private Sub Form_Load()
  34. On Error GoTo ErrorHandler:
  35.     Dim frmNew As New Form1
  36.     Show
  37.     Caption = "Instance " & Str$(FormCount + 1)
  38.     Refresh
  39.     Let FormCount = FormCount + 1
  40.     If FormCount < MAX_FORMS Then
  41.         Set frmNew = New Form1
  42.         Load frmNew
  43.         Set frmNew = Nothing
  44.     End If
  45.     Timer1.Enabled = True
  46.     Exit Sub
  47. ErrorHandler:
  48.     MsgBox "Your only have memory for  " & Str$(FormCount) & " forms." & vbCrLf _
  49.         & "Click OK.....forms will unload within a few seconds after a you click ok."
  50.     Timer1.Enabled = True
  51. End Sub
  52. Private Sub Timer1_Timer()
  53.     Unload Me
  54. End Sub
  55.