home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form w_push_demo
- BorderStyle = 3 'Fixed Dialog
- Caption = "ctPush (Enhanced Push Button) Demo"
- ClientHeight = 5400
- ClientLeft = 1140
- ClientTop = 1770
- ClientWidth = 7800
- Height = 5805
- Icon = "ct_push.frx":0000
- Left = 1080
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 5400
- ScaleWidth = 7800
- ShowInTaskbar = 0 'False
- Top = 1425
- Width = 7920
- Begin VB.CheckBox Check4
- Caption = "Draw Focus"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 420
- TabIndex = 17
- Top = 3840
- Value = 1 'Checked
- Width = 1635
- End
- Begin VB.Frame Frame2
- Caption = "Windows Style"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 915
- Left = 2340
- TabIndex = 6
- Top = 2880
- Width = 2595
- Begin VB.OptionButton Option6
- Caption = "Win 95"
- Height = 375
- Left = 1440
- TabIndex = 12
- Top = 360
- Value = -1 'True
- Width = 855
- End
- Begin VB.OptionButton Option5
- Caption = "Win 3.1"
- Height = 255
- Left = 240
- TabIndex = 11
- Top = 420
- Width = 1095
- End
- End
- Begin VB.Frame Frame1
- Caption = "Picture Position"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 1395
- Left = 2340
- TabIndex = 5
- Top = 1140
- Width = 2595
- Begin VB.OptionButton Option4
- Caption = "Right"
- Height = 315
- Left = 1440
- TabIndex = 10
- Top = 840
- Width = 975
- End
- Begin VB.OptionButton Option3
- Caption = "Left"
- Height = 315
- Left = 1440
- TabIndex = 9
- Top = 360
- Value = -1 'True
- Width = 975
- End
- Begin VB.OptionButton Option2
- Caption = "Bottom"
- Height = 315
- Left = 240
- TabIndex = 8
- Top = 840
- Width = 915
- End
- Begin VB.OptionButton Option1
- Caption = "Top"
- Height = 315
- Left = 240
- TabIndex = 7
- Top = 360
- Width = 795
- End
- End
- Begin VB.CheckBox Check3
- Caption = "Expand Picture"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 420
- TabIndex = 4
- Top = 3480
- Width = 1755
- End
- Begin VB.CheckBox Check2
- Caption = "Picture Only"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 420
- TabIndex = 3
- Top = 3120
- Width = 1755
- End
- Begin VB.CheckBox Check1
- Caption = "Disable Button"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 420
- TabIndex = 2
- Top = 2760
- Width = 1875
- End
- Begin PushLib.ctPush ctPush1
- Height = 1215
- Left = 360
- TabIndex = 22
- Top = 1260
- Width = 1695
- _version = 65536
- _extentx = 2990
- _extenty = 2143
- _stockprops = 70
- caption = "OK"
- BeginProperty font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 9.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- picture = "ct_push.frx":030A
- picturedisabled = "ct_push.frx":0A64
- picturedown = "ct_push.frx":11BE
- picposition = 3
- buttonheight = 81
- buttonwidth = 113
- End
- Begin VB.Label Label3
- Alignment = 2 'Center
- Caption = "The above buttons have been set up in a toggle state. "
- ForeColor = &H00800000&
- Height = 555
- Left = 5400
- TabIndex = 21
- Top = 2340
- Width = 2175
- End
- Begin PushLib.ctPush btn_tog3
- Height = 675
- Left = 6720
- TabIndex = 20
- Top = 1320
- Width = 555
- _version = 65536
- _extentx = 979
- _extenty = 1191
- _stockprops = 70
- caption = "#3"
- picture = "ct_push.frx":11DA
- picturedown = "ct_push.frx":136C
- picposition = 1
- buttonheight = 45
- buttonwidth = 37
- toggle = -1 'True
- End
- Begin PushLib.ctPush btn_tog2
- Height = 675
- Left = 6180
- TabIndex = 19
- Top = 1320
- Width = 555
- _version = 65536
- _extentx = 979
- _extenty = 1191
- _stockprops = 70
- caption = "#2"
- picture = "ct_push.frx":14FE
- picturedown = "ct_push.frx":1690
- picposition = 1
- buttonheight = 45
- buttonwidth = 37
- toggle = -1 'True
- End
- Begin PushLib.ctPush btn_tog1
- Height = 675
- Left = 5640
- TabIndex = 18
- Top = 1320
- Width = 555
- _version = 65536
- _extentx = 979
- _extenty = 1191
- _stockprops = 70
- caption = "#1"
- picture = "ct_push.frx":1822
- picturedown = "ct_push.frx":19B4
- picposition = 1
- buttonheight = 45
- buttonwidth = 37
- toggle = -1 'True
- End
- Begin SpinLib.ctSpin ctSpin1
- Height = 435
- Left = 4680
- TabIndex = 16
- Top = 4020
- Width = 255
- _version = 65536
- _extentx = 450
- _extenty = 767
- _stockprops = 64
- End
- Begin VB.Label txt_bevel
- Alignment = 2 'Center
- BorderStyle = 1 'Fixed Single
- Caption = "1"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 9.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00808080&
- Height = 435
- Left = 4020
- TabIndex = 15
- Top = 4020
- Width = 675
- End
- Begin VB.Label lbl_bevel
- Caption = "Picture Bevel :"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 9.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00808080&
- Height = 315
- Left = 2340
- TabIndex = 14
- Top = 4020
- Width = 1635
- End
- Begin VB.Label Label2
- Alignment = 2 'Center
- Caption = $"ct_push.frx":1B46
- ForeColor = &H00800000&
- Height = 495
- Left = 240
- TabIndex = 13
- Top = 4740
- Width = 5355
- End
- Begin PushLib.ctPush ctPush2
- Height = 975
- Left = 6360
- TabIndex = 1
- Top = 4260
- Width = 1215
- _version = 65536
- _extentx = 2143
- _extenty = 1720
- _stockprops = 70
- caption = "E&xit the Demo"
- BeginProperty font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- picture = "ct_push.frx":1BDA
- picturedown = "ct_push.frx":20DC
- picposition = 1
- multiline = 3
- picyoffset = 4
- buttonheight = 65
- buttonwidth = 81
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = $"ct_push.frx":25DE
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00800000&
- Height = 735
- Left = 240
- TabIndex = 0
- Top = 180
- Width = 7155
- End
- Attribute VB_Name = "w_push_demo"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Dim nBevel As Integer
- Private Sub btn_tog1_Click()
- If btn_tog1.State = False Then
- btn_tog2.State = True
- btn_tog3.State = True
- End If
- End Sub
- Private Sub btn_tog2_Click()
- If btn_tog2.State = False Then
- btn_tog1.State = True
- btn_tog3.State = True
- End If
- End Sub
- Private Sub btn_tog3_Click()
- If btn_tog3.State = False Then
- btn_tog1.State = True
- btn_tog2.State = True
- End If
- End Sub
- Private Sub Check1_Click()
- If Check1.Value Then
- ctPush1.Enabled = False
- Else
- ctPush1.Enabled = True
- End If
- End Sub
- Private Sub Check2_Click()
- ctPush1.PicOnly = Check2.Value
- If Check2.Value = False Then
- txt_bevel.Enabled = False
- ctSpin1.Enabled = False
- lbl_bevel.ForeColor = RGB(80, 80, 80)
- txt_bevel.ForeColor = RGB(80, 80, 80)
- Else
- txt_bevel.Enabled = True
- ctSpin1.Enabled = True
- lbl_bevel.ForeColor = RGB(0, 0, 0)
- txt_bevel.ForeColor = RGB(0, 0, 0)
- End If
- End Sub
- Private Sub Check3_Click()
- ctPush1.PicExpand = Check3.Value
- End Sub
- Private Sub Check4_Click()
- ctPush1.DrawFocus = Check4.Value
- End Sub
- Private Sub ctPush2_Click()
- Unload w_push_demo
- End Sub
- Private Sub ctSpin1_Click(nButton As Integer)
- If (nButton = 0) Then
- If (nBevel + 1 < 15) Then
- nBevel = nBevel + 1
- End If
- Else
- If (nBevel > 0) Then
- nBevel = nBevel - 1
- End If
- End If
- txt_bevel.Caption = LTrim(Str(nBevel))
- ctPush1.PicBevel = nBevel
- End Sub
- Private Sub Form_Load()
- ' Center the window on the screen
- Move (Screen.Width - Width) / 2, (Screen.Height - Height) * 0.15
- nBevel = 1
- End Sub
- Private Sub Option1_Click()
- ctPush1.PicPosition = 1
- End Sub
- Private Sub Option2_Click()
- ctPush1.PicPosition = 2
- End Sub
- Private Sub Option3_Click()
- ctPush1.PicPosition = 3
- End Sub
- Private Sub Option4_Click()
- ctPush1.PicPosition = 4
- End Sub
- Private Sub Option5_Click()
- ctPush1.WinStyle = 0
- End Sub
- Private Sub Option6_Click()
- ctPush1.WinStyle = 1
- End Sub
-