home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / crwdemo / child.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-12-05  |  1.6 KB  |  50 lines

  1. VERSION 2.00
  2. Begin Form Child 
  3.    Caption         =   "MDIChild"
  4.    ClientHeight    =   4020
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   3480
  8.    Height          =   4425
  9.    Left            =   1035
  10.    LinkTopic       =   "Child"
  11.    MDIChild        =   -1  'True
  12.    ScaleHeight     =   268
  13.    ScaleMode       =   3  'Pixel
  14.    ScaleWidth      =   232
  15.    Top             =   1140
  16.    Width           =   3600
  17. ' It is important to ensure that the ScaleMode of this
  18. ' Form be set to the same ScaleMode of CRYSTAL.VBX, Twips.
  19. Sub Form_Activate ()
  20.     'Main!StatusBar.Caption = " Active Window :- " & Me.Caption
  21. End Sub
  22. Sub Form_Paint ()
  23.     hWndChild = GetWindow(hWnd, GW_CHILD)
  24.     If (hWndChild <> 0) Then
  25.        MoveWindow hWndChild, ScaleLeft, ScaleTop, ScaleWidth, ScaleHeight, 1
  26.     End If
  27. End Sub
  28. Sub Form_Resize ()
  29.     hWndChild = GetWindow(hWnd, GW_CHILD)
  30.     If (hWndChild <> 0) Then
  31.        MoveWindow hWndChild, ScaleLeft, ScaleTop, ScaleWidth, ScaleHeight, 1
  32.     End If
  33. End Sub
  34. Sub Form_Unload (Cancel As Integer)
  35.     'Hide print Controls when closing Child Window
  36.      Main.Command1.Visible = False
  37.      Main.Command2.Visible = False
  38.      Main.Command3.Visible = False
  39.      Main.Command4.Visible = False
  40.      Main.Command5.Visible = False
  41.      
  42.     ' Window may be unloaded from SystemMenu or F4
  43.     ' so Main MenuFileClose needs to be updated
  44.     If Forms.Count = 2 Then
  45.         Main!MenuFileClose.Enabled = False
  46.         Main!StatusBar.Caption = " Ready"
  47.     End If
  48.     Unload Me
  49. End Sub
  50.