home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / PB_Button_861905232002.psc / Form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  2001-09-29  |  7.5 KB  |  220 lines

  1. VERSION 5.00
  2. Object = "*\APB_ButtonStip.vbp"
  3. Begin VB.Form Form1 
  4.    AutoRedraw      =   -1  'True
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   5760
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   4215
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   384
  12.    ScaleMode       =   3  'Pixel
  13.    ScaleWidth      =   281
  14.    StartUpPosition =   1  'CenterOwner
  15.    Begin PB_ButtonStip.pbButtonStip pbButtonStip1 
  16.       Height          =   330
  17.       Left            =   2325
  18.       TabIndex        =   0
  19.       Top             =   15
  20.       Width           =   1830
  21.       _ExtentX        =   3228
  22.       _ExtentY        =   582
  23.       TopRightBColor  =   16761024
  24.       TopRightAColor  =   14737632
  25.       TopLeftBColor   =   8388608
  26.       TopLeftAColor   =   12582912
  27.       BorderStyle     =   2
  28.       ScaleHeight     =   22
  29.       ScaleWidth      =   122
  30.       BeginProperty CaptionFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  31.          Name            =   "Arial"
  32.          Size            =   9.75
  33.          Charset         =   0
  34.          Weight          =   700
  35.          Underline       =   0   'False
  36.          Italic          =   0   'False
  37.          Strikethrough   =   0   'False
  38.       EndProperty
  39.       CaptionFontColor=   16777215
  40.       ButtonSelected  =   2
  41.       BackStyle       =   2
  42.       BeginProperty ButtonFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  43.          Name            =   "Arial"
  44.          Size            =   9.75
  45.          Charset         =   0
  46.          Weight          =   400
  47.          Underline       =   0   'False
  48.          Italic          =   0   'False
  49.          Strikethrough   =   0   'False
  50.       EndProperty
  51.       ButtonBColor    =   12582912
  52.       ButtonBorderStyle=   2
  53.    End
  54.    Begin PB_ButtonStip.pbButtonStip pbButtonStip2 
  55.       Align           =   3  'Align Left
  56.       Height          =   5760
  57.       Left            =   0
  58.       TabIndex        =   1
  59.       Top             =   0
  60.       Width           =   2115
  61.       _ExtentX        =   3731
  62.       _ExtentY        =   10160
  63.       TopRightAColor  =   49344
  64.       TopLeftBColor   =   49344
  65.       TopLeftAColor   =   49344
  66.       BackColor       =   14737632
  67.       BorderColor     =   16711680
  68.       BorderStyle     =   4
  69.       ScaleHeight     =   384
  70.       ScaleWidth      =   141
  71.       BeginProperty CaptionFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  72.          Name            =   "MS Sans Serif"
  73.          Size            =   8.25
  74.          Charset         =   0
  75.          Weight          =   400
  76.          Underline       =   0   'False
  77.          Italic          =   0   'False
  78.          Strikethrough   =   0   'False
  79.       EndProperty
  80.       ButtonSelected  =   3
  81.       ButtonStyle     =   1
  82.       BackStyle       =   1
  83.       BeginProperty ButtonFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  84.          Name            =   "MS Sans Serif"
  85.          Size            =   8.25
  86.          Charset         =   0
  87.          Weight          =   400
  88.          Underline       =   0   'False
  89.          Italic          =   0   'False
  90.          Strikethrough   =   0   'False
  91.       EndProperty
  92.       CaptionBorder   =   4
  93.       ButtonAColor    =   49344
  94.       BackgroundBColor=   49344
  95.       ButtonFontDownColor=   0
  96.       ButtonBorderStyle=   2
  97.       AutoHeight      =   0   'False
  98.       Begin VB.Label Label1 
  99.          Alignment       =   1  'Right Justify
  100.          BackStyle       =   0  'Transparent
  101.          Height          =   225
  102.          Left            =   1500
  103.          TabIndex        =   4
  104.          Top             =   5535
  105.          Width           =   540
  106.       End
  107.    End
  108.    Begin PB_ButtonStip.pbButtonStip pbButtonStip3 
  109.       Height          =   330
  110.       Left            =   2325
  111.       TabIndex        =   3
  112.       Top             =   4755
  113.       Width           =   1860
  114.       _ExtentX        =   3281
  115.       _ExtentY        =   582
  116.       TopRightBColor  =   14278627
  117.       TopRightAColor  =   16777215
  118.       TopLeftBColor   =   14737632
  119.       TopLeftAColor   =   -2147483633
  120.       BorderStyle     =   2
  121.       ScaleHeight     =   22
  122.       ScaleWidth      =   124
  123.       BeginProperty CaptionFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  124.          Name            =   "MS Sans Serif"
  125.          Size            =   8.25
  126.          Charset         =   0
  127.          Weight          =   400
  128.          Underline       =   0   'False
  129.          Italic          =   0   'False
  130.          Strikethrough   =   0   'False
  131.       EndProperty
  132.       ButtonSelected  =   2
  133.       ButtonStyle     =   1
  134.       BackStyle       =   1
  135.       BeginProperty ButtonFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  136.          Name            =   "MS Sans Serif"
  137.          Size            =   8.25
  138.          Charset         =   0
  139.          Weight          =   400
  140.          Underline       =   0   'False
  141.          Italic          =   0   'False
  142.          Strikethrough   =   0   'False
  143.       EndProperty
  144.       CaptionBorder   =   4
  145.       ButtonBorderStyle=   3
  146.    End
  147.    Begin VB.PictureBox Picture1 
  148.       AutoSize        =   -1  'True
  149.       Height          =   810
  150.       Left            =   3300
  151.       Picture         =   "Form1.frx":0000
  152.       ScaleHeight     =   50
  153.       ScaleMode       =   3  'Pixel
  154.       ScaleWidth      =   50
  155.       TabIndex        =   2
  156.       Top             =   4920
  157.       Visible         =   0   'False
  158.       Width           =   810
  159.    End
  160.    Begin VB.Image Image2 
  161.       Height          =   240
  162.       Left            =   1770
  163.       Picture         =   "Form1.frx":0388
  164.       Top             =   5340
  165.       Width           =   240
  166.    End
  167.    Begin VB.Image Image1 
  168.       Height          =   240
  169.       Left            =   2025
  170.       Picture         =   "Form1.frx":0E6A
  171.       Top             =   5250
  172.       Width           =   240
  173.    End
  174. Attribute VB_Name = "Form1"
  175. Attribute VB_GlobalNameSpace = False
  176. Attribute VB_Creatable = False
  177. Attribute VB_PredeclaredId = True
  178. Attribute VB_Exposed = False
  179. Option Explicit
  180. Private Declare Function SetRect Lib "user32" (lpRect As RECT, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
  181. Private Sub Form_Click()
  182. pbButtonStip2.About
  183. End Sub
  184. Private Sub Form_Load()
  185. Dim UsrRect As RECT
  186. Dim xx As Long
  187. AutoRedraw = True
  188. 'For xx = 0 To 67
  189. 'SetRect UsrRect, 0, ScaleHeight / 2 + (xx * 6), ScaleWidth, ScaleHeight / 2 + 3 + (xx * 6)
  190. ''free extra function to use -
  191. ''Oject.FadeColor hdc as long, color1 as ole_color, color2 as ole_color, rect as rect, height or width as long, direction as long
  192. 'pbButtonStip1.FadeColor hDC, vbWhite, vbBlue, UsrRect, ScaleWidth, 1
  193. 'SetRect UsrRect, 0, ScaleHeight / 2 + 3 + (xx * 6), ScaleWidth, ScaleHeight / 2 + 6 + (xx * 6)
  194. 'pbButtonStip1.FadeColor hDC, vbGreen, vbWhite, UsrRect, ScaleWidth, 1
  195. 'Next xx
  196. AutoRedraw = False
  197. For xx = 1 To 12
  198. pbButtonStip1.AddButton "Button" & xx
  199. If xx < 8 Then
  200. pbButtonStip2.AddButton "Button  Strip " & xx, , , , Image2.Picture
  201. End If
  202. Next xx
  203. For xx = 1 To 3
  204. pbButtonStip3.AddButton "Button " & xx, , , , Image1.Picture
  205. Next xx
  206. Set pbButtonStip1.BackgroundImage = Picture1.Picture
  207. pbButtonStip1.ButtonSelected = 2
  208. End Sub
  209. Private Sub pbButtonStip1_Click()
  210. pbButtonStip1.ButtonCaption(1) = "hello"
  211. pbButtonStip1.ButtonEnable(2) = False
  212. Label1.Caption = pbButtonStip1.ButtonSelected
  213. End Sub
  214. Private Sub pbButtonStip2_ButtonClick(ButtonIndex As Long)
  215. Label1.Caption = ButtonIndex
  216. End Sub
  217. Private Sub pbButtonStip3_ButtonClick(ButtonIndex As Long)
  218. Label1.Caption = ButtonIndex
  219. End Sub
  220.