home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / t_button / form1.frm next >
Text File  |  1993-11-18  |  3KB  |  138 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Toolbar Button Demo"
  4.    ClientHeight    =   1884
  5.    ClientLeft      =   1704
  6.    ClientTop       =   1992
  7.    ClientWidth     =   4140
  8.    Height          =   2304
  9.    Left            =   1656
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   1884
  12.    ScaleWidth      =   4140
  13.    Top             =   1620
  14.    Width           =   4236
  15.    Begin CommandButton Command3 
  16.       Caption         =   "Toggle"
  17.       Height          =   444
  18.       Left            =   2208
  19.       TabIndex        =   4
  20.       Top             =   1248
  21.       Width           =   1260
  22.    End
  23.    Begin ToolBarButton TBtn2 
  24.       Enabled         =   -1  'True
  25.       Height          =   540
  26.       Left            =   672
  27.       Picture         =   FORM1.FRX:0000
  28.       Sticky          =   -1  'True
  29.       Toggled         =   0   'False
  30.       Top             =   1200
  31.       Width           =   588
  32.    End
  33.    Begin ToolBarButton TBtn1 
  34.       Enabled         =   -1  'True
  35.       Height          =   540
  36.       Left            =   672
  37.       Picture         =   FORM1.FRX:01FA
  38.       Sticky          =   0   'False
  39.       Toggled         =   0   'False
  40.       Top             =   336
  41.       Width           =   588
  42.    End
  43.    Begin CommandButton Command2 
  44.       Caption         =   "Hide"
  45.       Height          =   396
  46.       Left            =   2208
  47.       TabIndex        =   1
  48.       Top             =   672
  49.       Width           =   1260
  50.    End
  51.    Begin CommandButton Command1 
  52.       Caption         =   "Disable"
  53.       Height          =   396
  54.       Left            =   2208
  55.       TabIndex        =   0
  56.       Top             =   192
  57.       Width           =   1260
  58.    End
  59.    Begin Label lblNormal 
  60.       Caption         =   "Sticky"
  61.       Height          =   204
  62.       Index           =   1
  63.       Left            =   672
  64.       TabIndex        =   3
  65.       Top             =   960
  66.       Width           =   876
  67.    End
  68.    Begin Label lblNormal 
  69.       Caption         =   "Normal"
  70.       Height          =   204
  71.       Index           =   0
  72.       Left            =   672
  73.       TabIndex        =   2
  74.       Top             =   96
  75.       Width           =   876
  76.    End
  77. End
  78.  
  79. Sub Command1_Click ()
  80.  
  81.   If TBtn1.Enabled Then
  82.     TBtn1.Enabled = False
  83.     Command1.Caption = "Enable"
  84.   Else
  85.     TBtn1.Enabled = True
  86.     Command1.Caption = "Disable"
  87.   End If
  88.   
  89. End Sub
  90.  
  91. Sub Command2_Click ()
  92.  
  93.   If TBtn1.Visible Then
  94.     TBtn1.Visible = False
  95.     Command2.Caption = "Unhide"
  96.   Else
  97.     TBtn1.Visible = True
  98.     Command2.Caption = "Hide"
  99.   End If
  100.   
  101. End Sub
  102.  
  103. Sub Command3_Click ()
  104.  
  105.   If TBtn2.Toggled Then
  106.     TBtn2.Toggled = False
  107.     Command3.Caption = "Toggle"
  108.   Else
  109.     TBtn2.Toggled = True
  110.     Command3.Caption = "UnToggle"
  111.   End If
  112.  
  113.   TBtn2.Refresh
  114. End Sub
  115.  
  116. Sub TBtn1_Click ()
  117.  
  118.   MsgBox "TBtn1_Click", 0, "Click"
  119.  
  120. End Sub
  121.  
  122. Sub TBtn2_Click ()
  123.  
  124.   Dim aString As String
  125.  
  126.   aString = "TBtn2_Click is "
  127.   
  128.   If TBtn2.Toggled Then
  129.     aString = aString + "Toggled"
  130.   Else
  131.     aString = aString + "Untoggled"
  132.   End If
  133.   
  134.   MsgBox aString, 0, "Click"
  135.  
  136. End Sub
  137.  
  138.