home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / crystal / extras / crpedemo / child.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-12-15  |  1.7 KB  |  55 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_Load ()
  23. Main!MenuFileClose.Enabled = True
  24. End Sub
  25. Sub Form_Paint ()
  26.     hWndChild = GetWindow(hWnd, GW_CHILD)
  27.     If (hWndChild <> 0) Then
  28.        MoveWindow hWndChild, ScaleLeft, ScaleTop, ScaleWidth, ScaleHeight, 1
  29.     End If
  30. End Sub
  31. Sub Form_Resize ()
  32.     hWndChild = GetWindow(hWnd, GW_CHILD)
  33.     If (hWndChild <> 0) Then
  34.        MoveWindow hWndChild, ScaleLeft, ScaleTop, ScaleWidth, ScaleHeight, 1
  35.     End If
  36. End Sub
  37. Sub Form_Unload (Cancel As Integer)
  38.     'Hide print Controls when closing Child Window
  39.      Main.Command3D13.Visible = False
  40.      Main.Command3D14.Visible = False
  41.      Main.Command3D15.Visible = False
  42.      Main.Command3D16.Visible = False
  43.      Main.Command3D17.Visible = False
  44.      Main.Panel3D1.Visible = False
  45.      
  46.      
  47.     ' Window may be unloaded from SystemMenu or F4
  48.     ' so Main MenuFileClose needs to be updated
  49.     If Forms.Count = 2 Then
  50.         Main!MenuFileClose.Enabled = False
  51.         Main!StatusBar.Caption = " Ready"
  52.     End If
  53.     Unload Me
  54. End Sub
  55.