home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1999 April / CD_Shareware_Magazine_31.iso / Free / Prg / splitpanel.exe / Main.frm (.txt) next >
Encoding:
Visual Basic Form  |  1998-12-07  |  4.0 KB  |  112 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMain 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   4500
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   7515
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   4500
  10.    ScaleWidth      =   7515
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin splittest.SplitPanel sp1 
  13.       Align           =   1  'Align Top
  14.       Height          =   4410
  15.       Left            =   0
  16.       TabIndex        =   0
  17.       Top             =   0
  18.       Width           =   7515
  19.       _ExtentX        =   13256
  20.       _ExtentY        =   7779
  21.       HorizontalSplit =   -1  'True
  22.       Begin splittest.SplitPanel sp2 
  23.          Height          =   2925
  24.          Left            =   165
  25.          TabIndex        =   2
  26.          Top             =   150
  27.          Width           =   7215
  28.          _ExtentX        =   12726
  29.          _ExtentY        =   5159
  30.          Begin VB.FileListBox fi1 
  31.             Height          =   1845
  32.             Left            =   120
  33.             TabIndex        =   4
  34.             Top             =   150
  35.             Width           =   3405
  36.          End
  37.          Begin splittest.SplitPanel sp3 
  38.             Height          =   2475
  39.             Left            =   3825
  40.             TabIndex        =   3
  41.             Top             =   90
  42.             Width           =   3180
  43.             _ExtentX        =   5609
  44.             _ExtentY        =   4366
  45.             HorizontalSplit =   -1  'True
  46.             Begin VB.TextBox t2 
  47.                Height          =   1185
  48.                Left            =   225
  49.                TabIndex        =   6
  50.                Text            =   "Text2"
  51.                Top             =   990
  52.                Width           =   2640
  53.             End
  54.             Begin VB.TextBox t1 
  55.                Height          =   480
  56.                Left            =   165
  57.                TabIndex        =   5
  58.                Text            =   "Text1"
  59.                Top             =   315
  60.                Width           =   2655
  61.             End
  62.          End
  63.       End
  64.       Begin VB.Frame f1 
  65.          Caption         =   "SplitPanel"
  66.          Height          =   900
  67.          Left            =   180
  68.          TabIndex        =   1
  69.          Top             =   3225
  70.          Width           =   7050
  71.          Begin VB.Label Label1 
  72.             Caption         =   "There are 3 nested SplitPanel controls in this demo.  If you can't seem to find one, check for the one above this frame."
  73.             Height          =   510
  74.             Left            =   180
  75.             TabIndex        =   7
  76.             Top             =   225
  77.             Width           =   6735
  78.          End
  79.       End
  80.    End
  81. Attribute VB_Name = "frmMain"
  82. Attribute VB_GlobalNameSpace = False
  83. Attribute VB_Creatable = False
  84. Attribute VB_PredeclaredId = True
  85. Attribute VB_Exposed = False
  86. Option Explicit
  87. ' This is just a simple test to show how to use the SplitPanel control.
  88. ' If you resize the window, and you have full window dragging on
  89. ' you system, you will notice that this is not a terribly fast program,
  90. ' but normal uses won't have three split panel controls, all nested,
  91. ' with each having to resize when the form resizes.  The control
  92. ' itself will not have to resize from dragging the splitbar until after
  93. ' the mouse button has been released, so the performance is not
  94. ' really an issue for real uses, especially if the finished app is
  95. ' compiled to native code.
  96. Private Sub Form_Load()         ' be sure to set the control setting in the form load event
  97. Set sp1.Control1 = sp2
  98. Set sp1.Control2 = f1
  99. Set sp2.Control1 = fi1
  100. Set sp2.Control2 = sp3
  101. Set sp3.Control1 = t1
  102. Set sp3.Control2 = t2
  103. End Sub
  104. Private Sub Form_Resize()       ' I did this as an example
  105.     On Error Resume Next
  106.     sp1.Height = frmMain.Height - 1000  ' sp1 is top aligned in this example
  107.     Label1.Top = 200
  108.     Label1.Left = 200
  109.     Label1.Width = f1.Width - 500
  110.     Label1.Height = f1.Height - 500
  111. End Sub
  112.