home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / tk_bar / tkbar.frm < prev    next >
Text File  |  1993-12-07  |  3KB  |  121 lines

  1. VERSION 2.00
  2. Begin Form frmButtonBar 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "ButtonBar"
  6.    ClientHeight    =   1560
  7.    ClientLeft      =   2115
  8.    ClientTop       =   1800
  9.    ClientWidth     =   3630
  10.    ClipControls    =   0   'False
  11.    Height          =   1995
  12.    Icon            =   TKBAR.FRX:0000
  13.    Left            =   2040
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    MinButton       =   0   'False
  17.    ScaleHeight     =   104
  18.    ScaleMode       =   3  'Pixel
  19.    ScaleWidth      =   242
  20.    Top             =   1440
  21.    Visible         =   0   'False
  22.    Width           =   3780
  23.    Begin PictureBox picTempIcon 
  24.       AutoRedraw      =   -1  'True
  25.       AutoSize        =   -1  'True
  26.       BackColor       =   &H00C0C0C0&
  27.       BorderStyle     =   0  'None
  28.       ClipControls    =   0   'False
  29.       Height          =   495
  30.       Left            =   1170
  31.       ScaleHeight     =   33
  32.       ScaleMode       =   3  'Pixel
  33.       ScaleWidth      =   52
  34.       TabIndex        =   1
  35.       Top             =   870
  36.       Width           =   780
  37.    End
  38.    Begin SSCommand cmdIcon 
  39.       Font3D          =   0  'None
  40.       ForeColor       =   &H00000000&
  41.       Height          =   570
  42.       Index           =   0
  43.       Left            =   150
  44.       Outline         =   0   'False
  45.       RoundedCorners  =   0   'False
  46.       TabIndex        =   0
  47.       Top             =   15
  48.       Width           =   570
  49.    End
  50.    Begin Menu mnuDummy 
  51.       Caption         =   "mnuDummyTop"
  52.       Enabled         =   0   'False
  53.       Visible         =   0   'False
  54.       Begin Menu mnuConfigure 
  55.          Caption         =   "Configure..."
  56.       End
  57.       Begin Menu mnuDummy2 
  58.          Caption         =   "-"
  59.       End
  60.       Begin Menu mnuAbout 
  61.          Caption         =   "About..."
  62.       End
  63.    End
  64. End
  65. Option Explicit
  66.  
  67. Sub cmdIcon_Click (Index As Integer)
  68.   '
  69.   '  Get the focus off the button.  Otherwise, a nasty
  70.   '  black border stays there.
  71.   '  Then DoEvents to make sure it's redrawn...
  72.   '
  73.   picTempIcon.SetFocus
  74.   DoEvents
  75.   Call ButtonBarExecute(Index)
  76.  
  77. End Sub
  78.  
  79. Sub cmdIcon_MouseDown (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  80.    If Button = 2 Then PopupMenu mnuDummy, 0, 0, 0
  81. End Sub
  82.  
  83. Sub cmdIcon_MouseUp (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  84. Dim Cond1%, Cond2%
  85.  
  86.   ' get focus off the button to get rid of black border
  87.   ' if dragged mouse down off the current button
  88.  
  89.   Me.ScaleMode = 1
  90.  
  91.   Cond1 = (Y > Me!cmdIcon(Index).Height) Or (Y < 0)
  92.   Cond2 = (X > Me!cmdIcon(Index).Width) Or (X < 0)
  93.   If Cond1 Or Cond2 Then
  94.      picTempIcon.SetFocus
  95.      DoEvents
  96.   End If
  97.  
  98. End Sub
  99.  
  100. Sub Form_Load ()
  101.  
  102.   picTempIcon.Top = 0
  103.   picTempIcon.Left = -200
  104.   Top = 0
  105.   Left = 0
  106.  
  107. End Sub
  108.  
  109. Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
  110.   Call IniSave
  111. End Sub
  112.  
  113. Sub mnuAbout_Click ()
  114.   frmAbout.Show 1
  115. End Sub
  116.  
  117. Sub mnuConfigure_Click ()
  118.   frmConfig.Show 1
  119. End Sub
  120.  
  121.