home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 26
/
CD_ASCQ_26_1295.iso
/
vrac
/
pzdemo.zip
/
OPTIONS.FRM
< prev
next >
Wrap
Text File
|
1995-09-03
|
39KB
|
1,117 lines
VERSION 2.00
Begin Form BevelOptFrm
BackColor = &H8000000F&
BorderStyle = 3 'Fixed Double
Caption = "3D Bevel Options"
ClientHeight = 2430
ClientLeft = 4470
ClientTop = 3975
ClientWidth = 4275
ControlBox = 0 'False
Height = 2835
KeyPreview = -1 'True
Left = 4410
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2430
ScaleWidth = 4275
Top = 3630
Width = 4395
Begin CommonDialog CD
Left = 2970
Top = 2550
End
Begin PZPanel BackPan
BackColor = &H00FF0000&
GradientColor = &H00400000&
GradientStyle = 1 'Vertical
Height = 2475
Left = 0
TabIndex = 0
Top = 0
Width = 4335
Begin PZLabel PanCmd
AutoClick = 1 'Command
BackColor = &H00C0C0C0&
BevelInnerWidth = 3
BevelOuter = 2 'Raised
BevelOuterShading= 5 '3D Button
BorderOuter = 1 'Solid
Caption = "&Apply"
CaptionPrefix = -1 'True
CornerSize = 4
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
GradientColor = &H00808080&
GradientStyle = 1 'Vertical
Height = 405
Index = 1
Left = 1590
ShowFocus = 8
TabIndex = 33
Top = 1890
Width = 1125
End
Begin PZLabel ColorOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Set Color..."
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 7
Left = 2220
TabIndex = 32
Top = 1110
Width = 1905
End
Begin PZLabel ColorOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Faded"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 6
Left = 2220
TabIndex = 31
Top = 720
Width = 1905
End
Begin PZLabel ColorOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Set Color..."
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 5
Left = 2220
TabIndex = 30
Top = 1110
Width = 1905
End
Begin PZLabel ColorOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Faded"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 4
Left = 2220
TabIndex = 29
Top = 720
Width = 1905
End
Begin PZLabel ColorOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Black Shade"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 3
Left = 2220
TabIndex = 28
Top = 1110
Width = 1905
End
Begin PZLabel ColorOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "White Light"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 2
Left = 2220
TabIndex = 27
Top = 720
Width = 1905
End
Begin PZLabel WidthLab
BorderOuter = 1 'Solid
Caption = "5"
DirectDraw = 0 'False
ForeColor = &H00800000&
Height = 255
Index = 3
Left = 2250
TabIndex = 26
Top = 1530
Width = 435
End
Begin PZLabel WidthLab
BorderOuter = 1 'Solid
Caption = "5"
DirectDraw = 0 'False
ForeColor = &H00800000&
Height = 255
Index = 2
Left = 2250
TabIndex = 25
Top = 1530
Width = 435
End
Begin PZLabel WidthLab
BorderOuter = 1 'Solid
Caption = "5"
DirectDraw = 0 'False
ForeColor = &H00800000&
Height = 255
Index = 1
Left = 2250
TabIndex = 24
Top = 1530
Width = 435
End
Begin PZLabel WidthLab
BorderOuter = 1 'Solid
Caption = "5"
ForeColor = &H00800000&
Height = 255
Index = 0
Left = 2250
TabIndex = 2
Top = 1530
Width = 435
End
Begin PZLabel PanCmd
AutoClick = 1 'Command
BackColor = &H00C0C0C0&
BevelInnerWidth = 3
BevelOuter = 2 'Raised
BevelOuterShading= 5 '3D Button
BorderOuter = 1 'Solid
Caption = "&Cancel"
CaptionPrefix = -1 'True
CornerSize = 4
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
GradientColor = &H00808080&
GradientStyle = 1 'Vertical
Height = 405
Index = 0
Left = 270
ShowFocus = 8
TabIndex = 3
Top = 1890
Width = 1125
End
Begin PZLabel PanCmd
AutoClick = 1 'Command
BackColor = &H00C0C0C0&
BevelInnerWidth = 3
BevelOuter = 2 'Raised
BevelOuterShading= 5 '3D Button
BorderOuter = 1 'Solid
Caption = "&OK"
CaptionPrefix = -1 'True
CornerSize = 4
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
GradientColor = &H00808080&
GradientStyle = 1 'Vertical
Height = 405
Index = 2
Left = 2910
ShowFocus = 8
TabIndex = 4
Top = 1890
Width = 1125
End
Begin PZLabel WidthPan
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Width"
CaptionMargin = 68
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = 32
IconTop = -7
Left = 2220
TabIndex = 5
Top = 1500
Width = 1905
End
Begin PZLabel ColorOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "White Light"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 0
Left = 2220
TabIndex = 6
Top = 720
Width = 1905
End
Begin PZLabel BevelOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "None"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 0
Left = 180
TabIndex = 7
Top = 720
Width = 1905
End
Begin PZLabel BevelOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Inset"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 1
Left = 180
TabIndex = 8
Top = 1110
Width = 1905
End
Begin PZLabel BevelOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Raised"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 2
Left = 180
TabIndex = 9
Top = 1500
Width = 1905
End
Begin PZLabel BevelOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "None"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 3
Left = 180
TabIndex = 17
Top = 720
Width = 1905
End
Begin PZLabel BevelOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Inset"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 4
Left = 180
TabIndex = 16
Top = 1110
Width = 1905
End
Begin PZLabel BevelOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Raised"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 5
Left = 180
TabIndex = 15
Top = 1500
Width = 1905
End
Begin PZLabel BevelOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "None"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 6
Left = 180
TabIndex = 18
Top = 720
Width = 1905
End
Begin PZLabel BevelOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Solid"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 7
Left = 180
TabIndex = 19
Top = 1110
Width = 1905
End
Begin PZLabel BevelOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Filled"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 8
Left = 180
TabIndex = 20
Top = 1500
Width = 1905
End
Begin PZLabel BevelOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "None"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 9
Left = 180
TabIndex = 21
Top = 720
Width = 1905
End
Begin PZLabel BevelOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Solid"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 10
Left = 180
TabIndex = 22
Top = 1110
Width = 1905
End
Begin PZLabel BevelOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Filled"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 11
Left = 180
TabIndex = 23
Top = 1500
Width = 1905
End
Begin PZLabel ColorOpt
Alignment = 1 'Left Justify - MIDDLE
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelOuterWidth = 1
Caption = "Black Shade"
CaptionMargin = 25
DirectDraw = 0 'False
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 315
IconLeft = -4
IconTop = -6
Index = 1
Left = 2220
TabIndex = 10
Top = 1110
Width = 1905
End
Begin PZLabel TabPan
Alignment = 6 'Center - TOP
BackColor = &H00C0C0C0&
BevelInnerWidth = 1
BevelOuter = 2 'Raised
BevelOuterShading= 6 '3D Frame
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
GradientColor = &H00808080&
GradientStyle = 1 'Vertical
Height = 1755
Left = 60
TabIndex = 11
Top = 600
Width = 4170
End
Begin PZLabel Tabs
Alignment = 6 'Center - TOP
AutoClick = 5 'Tab
BackColor = &H00FFFFFF&
BevelInnerWidth = 1
BevelOuter = 2 'Raised
BevelOuterShading= 6 '3D Frame
Caption = "Outer Border"
CornerSize = 4
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 585
Index = 2
Left = 2160
TabIndex = 12
TabStyle = 1 'Top Tab
Top = 60
Width = 1035
WordWrap = -1 'True
End
Begin PZLabel Tabs
Alignment = 6 'Center - TOP
AutoClick = 5 'Tab
BackColor = &H00FFFFFF&
BevelInnerWidth = 1
BevelOuter = 2 'Raised
BevelOuterShading= 6 '3D Frame
Caption = "Inner Border"
CornerSize = 4
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 585
Index = 3
Left = 3195
TabIndex = 13
TabStyle = 1 'Top Tab
Top = 60
Width = 1035
WordWrap = -1 'True
End
Begin PZLabel Tabs
Alignment = 6 'Center - TOP
AutoClick = 5 'Tab
BackColor = &H00FFFFFF&
BevelInnerWidth = 1
BevelOuter = 2 'Raised
BevelOuterShading= 6 '3D Frame
Caption = "Inner Bevel"
CornerSize = 4
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 585
Index = 1
Left = 1125
TabIndex = 14
TabStyle = 1 'Top Tab
Top = 60
Width = 1035
WordWrap = -1 'True
End
Begin PZLabel Tabs
Alignment = 6 'Center - TOP
AutoClick = 5 'Tab
BackColor = &H00FFFFFF&
BevelInnerWidth = 1
BevelOuter = 2 'Raised
BevelOuterShading= 6 '3D Frame
Caption = "Outer Bevel"
CornerSize = 4
Font3D = 2 'Block Right
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 585
Index = 0
Left = 60
TabIndex = 1
TabStyle = 1 'Top Tab
Top = 60
Width = 1065
WordWrap = -1 'True
End
End
Begin Image IconImg
Height = 480
Index = 5
Left = 2520
Picture = OPTIONS.FRX:0000
Top = 2580
Width = 480
End
Begin Image IconImg
Height = 480
Index = 4
Left = 2070
Picture = OPTIONS.FRX:0302
Top = 2610
Width = 480
End
Begin Image IconImg
Height = 480
Index = 3
Left = 1590
Picture = OPTIONS.FRX:0604
Top = 2580
Width = 480
End
Begin Image IconImg
Height = 480
Index = 2
Left = 1080
Picture = OPTIONS.FRX:0906
Top = 2550
Width = 480
End
Begin Image IconImg
Height = 480
Index = 1
Left = 570
Picture = OPTIONS.FRX:0C08
Top = 2520
Width = 480
End
Begin Image IconImg
Height = 480
Index = 0
Left = 60
Picture = OPTIONS.FRX:0F0A
Top = 2520
Width = 480
End
End
Option Explicit
'*******************************************************
'* *
'* Demo program for Pizazz 1.5 Custom Control. *
'* Written by Visual Bits *
'* Copyright ⌐ 1995 *
'* *
'* This software and documentation are supplied *
'* "AS IS". The author makes no warranty of any *
'* kind, either express or implied, with respect to *
'* this software and accompanying documentation. In *
'* no event shall the author of this software be *
'* liable for any damages arising out of the use of *
'* this product. Your use of this software indicates *
'* that you have read and agreed to these terms. *
'* *
'* Other then that, you may use this demo program *
'* source code in any way you find useful. *
'* *
'*******************************************************
' This form is used to demonstrate tabs, spinners, and
' options using Pizazz
Dim KeyIn(3) As Integer
Dim Spinning As Integer
Dim zTab As Integer
Dim Activating As Integer
Sub BevelOpt_Click (index As Integer)
Dim i As Integer
i = index \ 3
Tabs(i).Tag = Str$(index - i * 3)
ShowOptions
End Sub
Sub ColorOpt_Click (index As Integer)
Dim i As Integer
If index < 4 Then
i = (index And 1) + 1 Xor Val(ColorOpt(index).Tag)
ColorOpt(index).Tag = Str$(i)
ElseIf (index And 1) = 0 Then
i = index \ 2
Tabs(i).Tag = "4"
Else
CD.Flags = CC_RGBINIT
CD.Color = Val(ColorOpt(index).Tag)
CD.Action = DLG_COLOR
ColorOpt(index).Tag = Str$(CD.Color)
Exit Sub
End If
ShowOptions
End Sub
Sub Form_Activate ()
Activating = True
Tabs(0).ButtonState = True
Activating = False
End Sub
Sub Form_KeyPress (keyascii As Integer)
Dim i As Integer
Dim key As String
Dim Value As Integer
Value = Val(WidthLab(zTab))
key = Chr$(keyascii)
Select Case key
Case "0" To "9"
If KeyIn(zTab) Then
Value = Value * 10 + keyascii - &H30
Else
KeyIn(zTab) = True
Value = keyascii - &H30
End If
Case Chr$(8) ' backspace
Value = Value \ 10
End Select
If Value > 30 Then
Value = 30
End If
WidthLab(zTab) = Str$(Value)
ShowOptions
End Sub
Sub PanCmd_Click (index As Integer)
Tag = Str$(index)
If index = 1 Then
SetBevelOptions Me, Pzdemo!BigPan
Else
Me.Hide
End If
End Sub
Sub ShowOptions ()
Dim i As Integer, j As Integer, k As Integer, z As Integer
Dim numopts As Integer
Dim hicon As Integer
' After the form has been shown, the backpanel doesn't need
' to be painted when updating other controls - this prevents
' flashing.
' Note! This is only neccessary when using graphical controls like
' PZLabels layered on top of other graphical controls. I'm doing
' this to save resources and show how it's done.
'BackPan.EnablePainting = ToBeShown
' the TabPan tag represents which tab is "up"
z = Val(TabPan.Tag)
'If zTab <> z Then
' ' reorder the tabs - KeyIn is used to remember if
' ' a value has been typed into the width label for this
' ' tab
' KeyIn(z) = False
' For i = 0 To 3
' If i = z Then
' Tabs(i).BackColor = &HC0C0C0
' Tabs(i).ZOrder
' Else
' Tabs(i).BackColor = &HFFFFFF
' Tabs(i).ZOrder 1
' End If
'
' Next
' ' allow the tabs to paint
' If Not ToBeShown Then DoEvents
'End If
' the tab panel doesn't need to paint any more
TabPan.EnablePainting = Activating
' show the options that correspond to the "up" tab
' note that there is a set of three Bevel options per tab
' and each set occupies the same space
For j = 0 To 11
BevelOpt(j).Visible = False
If j < 4 Then WidthLab(j).Visible = False
If j < 8 Then ColorOpt(j).Visible = False
Next
For j = 0 To 2
' set the bevel options
k = z * 3 + j
hicon = 3
If j = Val(Tabs(z).Tag) Then
hicon = 4
End If
BevelOpt(k).Icon = IconImg(hicon).Picture
BevelOpt(k).Visible = True
' set the color options also
If j < 2 Then
k = z * 2 + j
hicon = 0 ' this means no icon
If z < 2 Then
hicon = 3 ' for tabs 0 and 1 option off by default
If Val(ColorOpt(k).Tag) Then
hicon = 4
End If
ElseIf j = 0 Then
hicon = 3
If Val(Tabs(z).Tag) = 4 Then hicon = 4
ElseIf j = 1 Then
hicon = 5 ' for tabs 2 and 3 a little green button
End If
If hicon Then ColorOpt(k).Icon = IconImg(hicon).Picture
ColorOpt(k).Visible = True
End If
Next
'WidthLab(z) = WidthLab(z).Tag
WidthLab(z).Visible = True
' clip out the width spinner labels (since they all occupy the same
' location you only need to clip the first one
WidthLab(0).ClipCtl = WidthPan.hCtl
' stop all that spinning...
If Not Spinning Then WidthPan.Icon = IconImg(0).Picture
' now let everybody finish painting before restoring the
' background painting
DoEvents
zTab = z
TabPan.EnablePainting = True
BackPan.EnablePainting = True
End Sub
Sub Tabs_Click (index As Integer)
If Tabs(index).ButtonState Then
KeyIn(index) = False
Tabs(index).BackColor = &HC0C0C0
TabPan.Tag = Str$(index)
ShowOptions
Else
Tabs(index).BackColor = &HFFFFFF
End If
End Sub
Sub WidthPan_MouseDown (Button As Integer, Shift As Integer, x As Single, y As Single)
Dim i As Integer, n As Integer
Dim ix As Integer, iy As Integer
Dim t As Single
' the following spinner index values were derived by subtracting
' an offset and dividing by the size of the spin hot spots
' if iy = 1 and ix = 1 or 2 then we got a click
ix = (x \ Screen.TwipsPerPixelX - 23) \ 13
iy = (y \ Screen.TwipsPerPixelY + 10) \ 14
' uncomment the next two statements to test the values in real time
'Debug.Print ix, iy
'Exit Sub
If iy = 1 Then
Spinning = True
If ix = 1 Then
i = -1
ElseIf ix = 2 Then
i = 1
Else
Exit Sub
End If
Do While Spinning
' holding down the mouse button spins the spinner
' change the value every .5 seconds
If Timer - t > .5 Then
t = Timer
n = Val(WidthLab(zTab)) + i
If n < 0 Then
n = 0
ElseIf n > 30 Then
n = 30
End If
TabPan.EnablePainting = False
BackPan.EnablePainting = False
WidthPan.Icon = IconImg(ix).Picture
WidthLab(zTab) = Str$(n)
End If
ShowOptions
Loop
End If
End Sub
Sub WidthPan_MouseUp (Button As Integer, Shift As Integer, x As Single, y As Single)
' stop spinning
Spinning = False
ShowOptions
End Sub