home *** CD-ROM | disk | FTP | other *** search
/ The Final Windows Shareware CD / _.img / winshare / vb / eztab / form1.frm < prev    next >
Text File  |  1993-12-04  |  8KB  |  271 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H8000000F&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   5460
  7.    ClientLeft      =   1770
  8.    ClientTop       =   510
  9.    ClientWidth     =   6240
  10.    ClipControls    =   0   'False
  11.    Height          =   5865
  12.    HelpContextID   =   4500
  13.    Left            =   1710
  14.    LinkTopic       =   "Form1"
  15.    ScaleHeight     =   5460
  16.    ScaleWidth      =   6240
  17.    Top             =   165
  18.    Width           =   6360
  19.    Begin EZTab EZTab 
  20.       BackColor       =   &H8000000F&
  21.       Caption         =   "EZTab&4"
  22.       ClipControls    =   0   'False
  23.       Height          =   3000
  24.       Index           =   3
  25.       Left            =   120
  26.       TabIndex        =   3
  27.       TabLeft         =   2730
  28.       TabWidth        =   930
  29.       Top             =   120
  30.       Width           =   6000
  31.       Begin Frame Frame1 
  32.          BackColor       =   &H8000000F&
  33.          Caption         =   "Frame1"
  34.          ClipControls    =   0   'False
  35.          Height          =   1335
  36.          Left            =   960
  37.          TabIndex        =   11
  38.          Top             =   720
  39.          Width           =   4200
  40.          Begin CheckBox Check4 
  41.             BackColor       =   &H8000000F&
  42.             Caption         =   "Check4"
  43.             Height          =   375
  44.             Left            =   360
  45.             TabIndex        =   13
  46.             Top             =   840
  47.             Width           =   3300
  48.          End
  49.          Begin CheckBox Check3 
  50.             BackColor       =   &H8000000F&
  51.             Caption         =   "Check3"
  52.             Height          =   375
  53.             Left            =   360
  54.             TabIndex        =   12
  55.             Top             =   360
  56.             Width           =   3300
  57.          End
  58.       End
  59.       Begin TextBox Text6 
  60.          BackColor       =   &H8000000F&
  61.          Height          =   375
  62.          Left            =   960
  63.          TabIndex        =   14
  64.          Text            =   "Text6"
  65.          Top             =   2280
  66.          Width           =   4200
  67.       End
  68.    End
  69.    Begin EZTab EZTab 
  70.       BackColor       =   &H8000000F&
  71.       Caption         =   "EZTab&3"
  72.       ClipControls    =   0   'False
  73.       Height          =   3000
  74.       Index           =   2
  75.       Left            =   120
  76.       TabIndex        =   2
  77.       TabLeft         =   1830
  78.       TabWidth        =   930
  79.       Top             =   120
  80.       Width           =   6000
  81.       Begin OptionButton Option2 
  82.          BackColor       =   &H8000000F&
  83.          Caption         =   "Option2"
  84.          Height          =   375
  85.          Left            =   1500
  86.          TabIndex        =   10
  87.          Top             =   1800
  88.          Width           =   3300
  89.       End
  90.       Begin OptionButton Option1 
  91.          BackColor       =   &H8000000F&
  92.          Caption         =   "Option1"
  93.          Height          =   375
  94.          Left            =   1500
  95.          TabIndex        =   9
  96.          Top             =   900
  97.          Value           =   -1  'True
  98.          Width           =   3300
  99.       End
  100.    End
  101.    Begin EZTab EZTab 
  102.       BackColor       =   &H8000000F&
  103.       Caption         =   "EZTab&2"
  104.       Height          =   3000
  105.       Index           =   1
  106.       Left            =   120
  107.       TabIndex        =   1
  108.       TabLeft         =   930
  109.       TabWidth        =   900
  110.       Top             =   120
  111.       Width           =   6000
  112.       Begin TextBox Text5 
  113.          Height          =   2055
  114.          Left            =   360
  115.          MultiLine       =   -1  'True
  116.          ScrollBars      =   3  'Both
  117.          TabIndex        =   8
  118.          Text            =   "Text5"
  119.          Top             =   600
  120.          Width           =   5295
  121.       End
  122.    End
  123.    Begin PictureBox Picture1 
  124.       AutoRedraw      =   -1  'True
  125.       ClipControls    =   0   'False
  126.       FontBold        =   -1  'True
  127.       FontItalic      =   0   'False
  128.       FontName        =   "Courier"
  129.       FontSize        =   9.75
  130.       FontStrikethru  =   0   'False
  131.       FontUnderline   =   0   'False
  132.       Height          =   1335
  133.       Left            =   120
  134.       ScaleHeight     =   1305
  135.       ScaleWidth      =   3345
  136.       TabIndex        =   20
  137.       TabStop         =   0   'False
  138.       Top             =   3960
  139.       Width           =   3375
  140.    End
  141.    Begin EZTab EZTab 
  142.       BackColor       =   &H8000000F&
  143.       Caption         =   "EZTab&1"
  144.       ClipControls    =   0   'False
  145.       Height          =   3000
  146.       Index           =   0
  147.       Left            =   120
  148.       TabIndex        =   0
  149.       TabLeft         =   30
  150.       TabWidth        =   900
  151.       Top             =   120
  152.       Width           =   6000
  153.       Begin TextBox Text4 
  154.          Height          =   285
  155.          Left            =   600
  156.          TabIndex        =   7
  157.          Text            =   "Text4"
  158.          Top             =   2400
  159.          Width           =   4800
  160.       End
  161.       Begin TextBox Text3 
  162.          Height          =   285
  163.          Left            =   600
  164.          TabIndex        =   6
  165.          Text            =   "Text3"
  166.          Top             =   1800
  167.          Width           =   4800
  168.       End
  169.       Begin TextBox Text2 
  170.          Height          =   285
  171.          Left            =   600
  172.          TabIndex        =   5
  173.          Text            =   "Text2"
  174.          Top             =   1200
  175.          Width           =   4800
  176.       End
  177.       Begin TextBox Text1 
  178.          Height          =   285
  179.          Left            =   600
  180.          TabIndex        =   4
  181.          Text            =   "Text1"
  182.          Top             =   600
  183.          Width           =   4800
  184.       End
  185.    End
  186.    Begin CommandButton Command1 
  187.       Caption         =   "Disable #4"
  188.       Height          =   375
  189.       Index           =   3
  190.       Left            =   4920
  191.       TabIndex        =   19
  192.       Top             =   4680
  193.       Width           =   1200
  194.    End
  195.    Begin CommandButton Command1 
  196.       Caption         =   "Disable #3"
  197.       Height          =   375
  198.       Index           =   2
  199.       Left            =   4920
  200.       TabIndex        =   18
  201.       Top             =   4200
  202.       Width           =   1200
  203.    End
  204.    Begin CommandButton Command1 
  205.       Caption         =   "Disable #2"
  206.       Height          =   375
  207.       Index           =   1
  208.       Left            =   3600
  209.       TabIndex        =   17
  210.       Top             =   4680
  211.       Width           =   1200
  212.    End
  213.    Begin CommandButton Command1 
  214.       Caption         =   "Disable #1"
  215.       Height          =   375
  216.       Index           =   0
  217.       Left            =   3600
  218.       TabIndex        =   16
  219.       Top             =   4200
  220.       Width           =   1200
  221.    End
  222.    Begin Label Label1 
  223.       Alignment       =   2  'Center
  224.       BackColor       =   &H8000000F&
  225.       Caption         =   "double click in the 'tab area' with the right mouse button to switch between EZ-Tab controls in design mode."
  226.       Height          =   375
  227.       Left            =   120
  228.       TabIndex        =   15
  229.       Top             =   3360
  230.       Width           =   6000
  231.    End
  232. End
  233. Option Explicit
  234.  
  235. Sub Command1_Click (Index As Integer)
  236.     eztab(Index).Enabled = Not eztab(Index).Enabled
  237.  
  238.     If eztab(Index).Enabled = False Then
  239.         Command1(Index).Caption = "Enable #" + Format$(Index + 1)
  240.     Else
  241.         Command1(Index).Caption = "Disable #" + Format$(Index + 1)
  242.     End If
  243. End Sub
  244.  
  245. Sub EZTab_Activate (Index As Integer)
  246.     OutString "Activate", Index
  247. End Sub
  248.  
  249. Sub EZTab_Click (Index As Integer)
  250.     OutString "Click", Index
  251. End Sub
  252.  
  253. Sub EZTab_DblClick (Index As Integer)
  254.     OutString "DblClick", Index
  255. End Sub
  256.  
  257. Sub EZTab_Deactivate (Index As Integer)
  258.     OutString "Deactivate", Index
  259. End Sub
  260.  
  261. Sub OutString (sText As String, iNum As Integer)
  262.     sText = Left$(sText + Space$(20), 20) + Format$(iNum)
  263.  
  264.     If Picture1.CurrentY + Picture1.TextHeight(sText) >= Picture1.ScaleHeight Then
  265.         Picture1.Cls
  266.     End If
  267.  
  268.     Picture1.Print sText
  269. End Sub
  270.  
  271.