home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{FBC672E3-F04D-11D2-AFA5-E82C878FD532}#5.8#0"; "AS-IFCE1.OCX"
- Begin VB.Form frmPowerButtonDemonstration
- BackColor = &H80000016&
- BorderStyle = 3 'Fixed Dialog
- Caption = "PowerButton / ToolButton version 4 Demonstration"
- ClientHeight = 5325
- ClientLeft = 450
- ClientTop = 585
- ClientWidth = 7935
- Icon = "PowerButton.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 355
- ScaleMode = 3 'Pixel
- ScaleWidth = 529
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin VB.CommandButton cmdProperties
- Caption = "Font..."
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Index = 1
- Left = 5400
- TabIndex = 29
- Top = 2520
- Width = 1185
- End
- Begin VB.CommandButton cmdProperties
- Caption = "Colours..."
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Index = 0
- Left = 4185
- TabIndex = 28
- Top = 2520
- Width = 1185
- End
- Begin AriadIFceCompTest.EventList lstEvents
- Height = 1500
- Left = 3420
- TabIndex = 24
- Top = 3105
- Width = 4380
- _ExtentX = 7726
- _ExtentY = 2646
- End
- Begin VB.TextBox txtCaption
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 600
- Left = 4185
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 12
- Text = "PowerButton.frx":0E42
- Top = 315
- Width = 2220
- End
- Begin VB.ComboBox cboAlignment
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Index = 0
- ItemData = "PowerButton.frx":0E5D
- Left = 4185
- List = "PowerButton.frx":0E7C
- Style = 2 'Dropdown List
- TabIndex = 18
- Top = 1305
- Width = 2220
- End
- Begin VB.ComboBox cboAlignment
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Index = 1
- ItemData = "PowerButton.frx":0F2B
- Left = 4185
- List = "PowerButton.frx":0F38
- Style = 2 'Dropdown List
- TabIndex = 20
- Top = 1980
- Width = 2220
- End
- Begin VB.TextBox txtNum
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Index = 0
- Left = 6570
- TabIndex = 14
- Text = "0"
- Top = 315
- Width = 1230
- End
- Begin VB.TextBox txtNum
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Index = 1
- Left = 6570
- TabIndex = 16
- Text = "0"
- Top = 945
- Width = 1230
- End
- Begin VB.ComboBox cboBorderStyle
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- ItemData = "PowerButton.frx":0F69
- Left = 90
- List = "PowerButton.frx":0F7F
- Style = 2 'Dropdown List
- TabIndex = 1
- Top = 315
- Width = 1860
- End
- Begin VB.ComboBox cboFocus
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- ItemData = "PowerButton.frx":0FE6
- Left = 2160
- List = "PowerButton.frx":0FF3
- Style = 2 'Dropdown List
- TabIndex = 3
- Top = 315
- Width = 1860
- End
- Begin VB.CheckBox chkDefault
- Caption = "Defa&ult"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 90
- TabIndex = 4
- Top = 810
- Width = 1635
- End
- Begin VB.CheckBox chkEnabled
- Caption = "&Enabled"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 90
- TabIndex = 5
- Top = 1125
- Value = 1 'Checked
- Width = 1635
- End
- Begin VB.CheckBox chkChecked
- Caption = "C&hecked"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 90
- TabIndex = 6
- Top = 1440
- Width = 1635
- End
- Begin VB.CheckBox chkForceUp
- Caption = "Force&Up"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 2160
- TabIndex = 9
- Top = 1080
- Width = 1635
- End
- Begin VB.CheckBox chkForceDown
- Caption = "Force&Down"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 2160
- TabIndex = 10
- Top = 1395
- Width = 1635
- End
- Begin VB.CheckBox chkHot
- Caption = "&HotTracking"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 90
- TabIndex = 7
- Top = 1755
- Value = 1 'Checked
- Width = 1635
- End
- Begin VB.CheckBox chkFlat
- Caption = "Flat Butt&ons"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 90
- TabIndex = 8
- Top = 2115
- Width = 1635
- End
- Begin VB.ComboBox cboMode
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- ItemData = "PowerButton.frx":102F
- Left = 90
- List = "PowerButton.frx":1042
- Style = 2 'Dropdown List
- TabIndex = 22
- Top = 2700
- Width = 2220
- End
- Begin AIFCmp1.asxPowerButton btnDemo
- Height = 1500
- Left = 90
- TabIndex = 23
- Top = 3105
- Width = 1500
- _ExtentX = 2646
- _ExtentY = 2646
- Picture = "PowerButton.frx":10B2
- PictureDown = "PowerButton.frx":13CC
- PictureOver = "PowerButton.frx":16E6
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- PictureAlignment= 1
- HotTracking = -1 'True
- HotTrackingColor= -2147483639
- Mode = 3
- DropDownWidth = 24
- End
- Begin AIFCmp1.asxToolButton tbtnDemo
- Height = 1500
- Left = 1710
- Top = 3105
- Width = 1500
- _ExtentX = 2646
- _ExtentY = 2646
- Picture = "PowerButton.frx":1A00
- PictureDown = "PowerButton.frx":1D1A
- PictureOver = "PowerButton.frx":2034
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- PictureAlignment= 1
- HotTracking = -1 'True
- HotTrackingColor= -2147483639
- Mode = 3
- DropDownWidth = 24
- End
- Begin AIFCmp1.asxLineHeaderEx asxLineHeaderEx1
- Height = 30
- Left = 90
- TabIndex = 25
- Top = 4680
- Width = 7710
- _ExtentX = 13600
- _ExtentY = 53
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Caption = ""
- TextColor = 0
- End
- Begin AIFCmp1.asxPowerButton btnAction
- Cancel = -1 'True
- Default = -1 'True
- Height = 420
- Index = 2
- Left = 6570
- TabIndex = 27
- Top = 4770
- Width = 1230
- _ExtentX = 2170
- _ExtentY = 741
- Picture = "PowerButton.frx":234E
- Caption = "C&lose"
- CaptionOffsetX = 8
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- PictureAlignment= 3
- End
- Begin AIFCmp1.asxPowerButton btnAction
- Height = 420
- Index = 1
- Left = 5310
- TabIndex = 26
- Top = 4770
- Width = 1230
- _ExtentX = 2170
- _ExtentY = 741
- Picture = "PowerButton.frx":24A8
- Caption = "&About..."
- CaptionOffsetX = 8
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- PictureAlignment= 3
- End
- Begin VB.Label lbLhdr
- AutoSize = -1 'True
- Caption = "&Caption:"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 2
- Left = 4185
- TabIndex = 11
- Top = 90
- Width = 615
- End
- Begin VB.Label lbLhdr
- AutoSize = -1 'True
- Caption = "Caption&Alignment:"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 3
- Left = 4185
- TabIndex = 17
- Top = 1080
- Width = 1320
- End
- Begin VB.Label lbLhdr
- AutoSize = -1 'True
- Caption = "Caption&TextAlignment:"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 4
- Left = 4185
- TabIndex = 19
- Top = 1755
- Width = 1650
- End
- Begin VB.Label lbLhdr
- AutoSize = -1 'True
- Caption = "CaptionOffsetX:"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 6
- Left = 6570
- TabIndex = 13
- Top = 90
- Width = 1170
- End
- Begin VB.Label lbLhdr
- AutoSize = -1 'True
- Caption = "CaptionOffsetY:"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 7
- Left = 6570
- TabIndex = 15
- Top = 720
- Width = 1170
- End
- Begin VB.Label lbLhdr
- AutoSize = -1 'True
- Caption = "&BorderStyle:"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 0
- Left = 90
- TabIndex = 0
- Top = 90
- Width = 900
- End
- Begin VB.Label lbLhdr
- AutoSize = -1 'True
- Caption = "&FocusStyle:"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 1
- Left = 2160
- TabIndex = 2
- Top = 90
- Width = 840
- End
- Begin VB.Label lbLhdr
- AutoSize = -1 'True
- Caption = "&Mode:"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 5
- Left = 90
- TabIndex = 21
- Top = 2475
- Width = 450
- End
- Begin VB.Menu mnuPopup
- Caption = ""
- Visible = 0 'False
- Begin VB.Menu mnuPopupSub
- Caption = "Sample DropDown Menu Item &1"
- Index = 0
- End
- Begin VB.Menu mnuPopupSub
- Caption = "Sample DropDown Menu Item &2"
- Index = 1
- End
- Begin VB.Menu mnuPopupSub
- Caption = "Sample DropDown Menu Item &3"
- Index = 2
- End
- Begin VB.Menu mnuPopupSub
- Caption = "Sample DropDown Menu Item &4"
- Index = 3
- End
- Begin VB.Menu mnuPopupSub
- Caption = "Sample DropDown Menu Item &5"
- Index = 4
- End
- End
- Attribute VB_Name = "frmPowerButtonDemonstration"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- DefInt A-Z
- Private Sub btnAction_Click(Index As Integer)
- Select Case Index
- Case 1: btnDemo.About
- Case 2: Unload Me
- End Select
- End Sub
- Private Sub btnDemo_Checked(ByVal IsChecked As Boolean)
- lstEvents.Add "Checked(" & IsChecked & ")"
- End Sub
- Private Sub btnDemo_Click()
- lstEvents.Add "Click"
- End Sub
- Private Sub btnDemo_Clicked(ByVal IsClicked As Boolean)
- lstEvents.Add "Clicked(" & IsClicked & ")"
- End Sub
- Private Sub btnDemo_DblClick()
- lstEvents.Add "DblClick"
- End Sub
- Private Sub btnDemo_DropDownClicked()
- lstEvents.Add "DropDownClicked"
- End Sub
- Private Sub btnDemo_GotFocus()
- lstEvents.Add "GotFocus"
- End Sub
- Private Sub btnDemo_KeyDown(KeyCode As Integer, Shift As Integer)
- lstEvents.Add "KeyDown(" & KeyCode & "," & Shift & ")"
- End Sub
- Private Sub btnDemo_KeyPress(KeyAscii As Integer)
- lstEvents.Add "KeyPress(" & KeyAscii & ")"
- End Sub
- Private Sub btnDemo_KeyUp(KeyCode As Integer, Shift As Integer)
- lstEvents.Add "KeyUp(" & KeyCode & "," & Shift & ")"
- End Sub
- Private Sub btnDemo_LostFocus()
- lstEvents.Add "LostFocus"
- End Sub
- Private Sub btnDemo_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- lstEvents.Add "MouseDown(" & Button & "," & Shift & "," & X & "," & Y & ")"
- End Sub
- Private Sub btnDemo_MouseEnter()
- lstEvents.Add "MouseEnter"
- End Sub
- Private Sub btnDemo_MouseLeave()
- lstEvents.Add "MouseLeave"
- End Sub
- Private Sub btnDemo_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- ' lstEvents.add "MouseMove(" & Button & "," & Shift & "," & X & "," & Y & ")"
- End Sub
- Private Sub btnDemo_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- lstEvents.Add "MouseUp(" & Button & "," & Shift & "," & X & "," & Y & ")"
- End Sub
- Private Sub btnDemo_RightClick()
- lstEvents.Add "RightClick"
- End Sub
- Private Sub cboAlignment_Click(Index As Integer)
- Select Case Index
- Case 0
- btnDemo.CaptionAlignment = cboAlignment(0).ListIndex
- tbtnDemo.CaptionAlignment = cboAlignment(0).ListIndex
- Case 1
- btnDemo.CaptionTextAlignment = cboAlignment(1).ListIndex
- tbtnDemo.CaptionTextAlignment = cboAlignment(1).ListIndex
- End Select
- End Sub
- Private Sub cboBorderStyle_Click()
- btnDemo.BorderStyle = cboBorderStyle.ListIndex
- tbtnDemo.BorderStyle = cboBorderStyle.ListIndex
- End Sub
- Private Sub cboFocus_Click()
- btnDemo.FocusStyle = cboFocus.ListIndex
- End Sub
- Private Sub cboMode_Click()
- btnDemo.Mode = cboMode.ListIndex
- tbtnDemo.Mode = cboMode.ListIndex
- End Sub
- Private Sub chkChecked_Click()
- btnDemo.Checked = chkChecked
- tbtnDemo.Checked = chkChecked
- End Sub
- Private Sub chkDefault_Click()
- btnDemo.Default = chkDefault
- End Sub
- Private Sub chkEnabled_Click()
- btnDemo.Enabled = chkEnabled
- tbtnDemo.Enabled = chkEnabled
- End Sub
- Private Sub chkFlat_Click()
- btnDemo.Appearance = IIf(chkFlat, ifcaFlat, ifcaStandard)
- tbtnDemo.Appearance = IIf(chkFlat, ifcaFlat, ifcaStandard)
- End Sub
- Private Sub chkForceDown_Click()
- btnDemo.ForceDown = chkForceDown
- tbtnDemo.ForceDown = chkForceDown
- End Sub
- Private Sub chkForceUp_Click()
- btnDemo.ForceUp = chkForceUp
- tbtnDemo.ForceUp = chkForceUp
- End Sub
- Private Sub chkHot_Click()
- btnDemo.HotTracking = chkHot
- tbtnDemo.HotTracking = chkHot
- End Sub
- Private Sub cmdProperties_Click(Index As Integer)
- Select Case Index
- Case 0: PropPage.ShowPicker hWnd, "Object Colour", btnDemo, ppickColor
- Case 1: PropPage.ShowPicker hWnd, "Object Font", btnDemo, ppickFont
- End Select
- End Sub
- Private Sub Form_Load()
- cboBorderStyle.ListIndex = pbbsWindows95
- cboFocus.ListIndex = aifsAroundButton
- txtCaption = "PowerButton" & vbCrLf & "version 4.0"
- txtCaption_Change
- cboAlignment(0).ListIndex = aiaCenterCenter
- cboAlignment(1).ListIndex = ifsaCenter
- cboMode.ListIndex = pbbmNormal
- Set btnDemo.DropDownParent = Me
- Set btnDemo.DropDownMenu = mnuPopup
- Set tbtnDemo.DropDownMenu = mnuPopup
- Set tbtnDemo.DropDownParent = Me
- End Sub
- Private Sub txtCaption_Change()
- btnDemo.Caption = txtCaption
- tbtnDemo.Caption = txtCaption
- End Sub
- Private Sub txtNum_Change(Index As Integer)
- Dim V
- V = Val(txtNum(Index))
- Select Case Index
- Case 0
- btnDemo.CaptionOffsetX = V
- tbtnDemo.CaptionOffsetX = V
- Case 1
- btnDemo.CaptionOffsetY = V
- tbtnDemo.CaptionOffsetY = V
- End Select
- End Sub
-