home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{20976770-692B-4564-84B5-CCC822AA2B7A}#1.2#0"; "CmdBtnX5.ocx"
- Begin VB.Form frmPictures
- BorderStyle = 3 'Fixed Dialog
- Caption = "Pictures Demonstration"
- ClientHeight = 6495
- ClientLeft = 1950
- ClientTop = 1545
- ClientWidth = 6105
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Icon = "Pictures.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 433
- ScaleMode = 3 'Pixel
- ScaleWidth = 407
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin CommandButtonXCtl.CommandButtonX cmdClose
- Cancel = -1 'True
- Default = -1 'True
- Height = 375
- Left = 4815
- TabIndex = 22
- Tag = "Close this demonstration window"
- Top = 5985
- Width = 1140
- _ExtentX = 2011
- _ExtentY = 661
- DropDownPicture = "Pictures.frx":014A
- CaptionOffsetX = 8
- PictureAlignment= 3
- Caption = "C&lose"
- 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
- Picture = "Pictures.frx":01CC
- End
- Begin VB.CheckBox chkEnabled
- Caption = "Enabled"
- Height = 285
- Left = 3105
- TabIndex = 21
- Tag = "Enables or disables the demonstration control"
- Top = 6030
- Value = 1 'Checked
- Width = 1140
- End
- Begin CommandButtonXDemo.pucTextTip tipPicture
- Height = 1185
- Left = 135
- Top = 5130
- Width = 2805
- _ExtentX = 4948
- _ExtentY = 2090
- 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
- Text = "pucSimpleTip2"
- End
- Begin CommandButtonXCtl.CommandButtonX cmdxDemo
- Height = 1500
- Left = 3105
- TabIndex = 20
- Top = 4320
- Width = 2850
- _ExtentX = 5027
- _ExtentY = 2646
- DropDownPicture = "Pictures.frx":0326
- HoverPicture = "Pictures.frx":03A8
- Caption = ""
- 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
- Picture = "Pictures.frx":0C82
- DownPicture = "Pictures.frx":155C
- End
- Begin VB.Frame Frame1
- Caption = "Picture Properties:"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 3300
- Left = 135
- TabIndex = 0
- Top = 1665
- Width = 2850
- Begin VB.CommandButton cmdAction
- Caption = "Clear"
- Height = 330
- Index = 7
- Left = 1440
- TabIndex = 12
- Tag = "This picture is used when the mouse hovers over the button."
- Top = 2745
- Width = 1140
- End
- Begin VB.CommandButton cmdAction
- Caption = "Change..."
- Height = 330
- Index = 6
- Left = 270
- TabIndex = 11
- Tag = "This picture is used when the mouse hovers over the button."
- Top = 2745
- Width = 1140
- End
- Begin VB.CommandButton cmdAction
- Caption = "Clear"
- Height = 330
- Index = 5
- Left = 1440
- TabIndex = 9
- Tag = "This picture is used when either the button is checked, or if the mouse or keyboard is being used to press the button."
- Top = 2025
- Width = 1140
- End
- Begin VB.CommandButton cmdAction
- Caption = "Change..."
- Height = 330
- Index = 4
- Left = 270
- TabIndex = 8
- Tag = "This picture is used when either the button is checked, or if the mouse or keyboard is being used to press the button."
- Top = 2025
- Width = 1140
- End
- Begin VB.CommandButton cmdAction
- Caption = "Clear"
- Height = 330
- Index = 3
- Left = 1440
- TabIndex = 6
- Tag = $"Pictures.frx":1E36
- Top = 1305
- Width = 1140
- End
- Begin VB.CommandButton cmdAction
- Caption = "Change..."
- Height = 330
- Index = 2
- Left = 270
- TabIndex = 5
- Tag = $"Pictures.frx":1ED7
- Top = 1305
- Width = 1140
- End
- Begin VB.CommandButton cmdAction
- Caption = "Clear"
- Height = 330
- Index = 1
- Left = 1440
- TabIndex = 3
- Tag = $"Pictures.frx":1F78
- Top = 585
- Width = 1140
- End
- Begin VB.CommandButton cmdAction
- Caption = "Change..."
- Height = 330
- Index = 0
- Left = 270
- TabIndex = 2
- Tag = $"Pictures.frx":2003
- Top = 585
- Width = 1140
- End
- Begin VB.Label lblHdr
- AutoSize = -1 'True
- Caption = "HoverPicture:"
- Height = 195
- Index = 3
- Left = 270
- TabIndex = 10
- Top = 2520
- Width = 990
- End
- Begin VB.Label lblHdr
- AutoSize = -1 'True
- Caption = "DownPicture:"
- Height = 195
- Index = 2
- Left = 270
- TabIndex = 7
- Top = 1800
- Width = 960
- End
- Begin VB.Label lblHdr
- AutoSize = -1 'True
- Caption = "DisabledPicture:"
- Height = 195
- Index = 1
- Left = 270
- TabIndex = 4
- Top = 1080
- Width = 1155
- End
- Begin VB.Label lblHdr
- AutoSize = -1 'True
- Caption = "Picture:"
- Height = 195
- Index = 0
- Left = 270
- TabIndex = 1
- Top = 360
- Width = 555
- End
- End
- Begin CommandButtonXDemo.pucTextTip pucSimpleTip1
- Height = 600
- Left = 135
- Top = 945
- Width = 5820
- _ExtentX = 10266
- _ExtentY = 1058
- 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
- Text = "The CommandButtonX control has nine properties for dealing with pictures, from hover effects to image transparency."
- End
- Begin VB.Frame Frame2
- Caption = "Positioning:"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 2445
- Left = 3105
- TabIndex = 13
- Top = 1710
- Width = 2850
- Begin VB.HScrollBar hsbX
- Height = 240
- Left = 270
- Max = 50
- Min = -50
- TabIndex = 17
- Tag = "Adjusts the left-right offset, allowing extra positioning control."
- Top = 1260
- Width = 2310
- End
- Begin VB.HScrollBar hsbY
- Height = 240
- Left = 270
- Max = 50
- Min = -50
- TabIndex = 19
- Tag = "Adjusts the up-down offset, allowing extra positioning control."
- Top = 1890
- Width = 2310
- End
- Begin VB.ComboBox cboAlignmentEx
- Height = 315
- ItemData = "Pictures.frx":208E
- Left = 270
- List = "Pictures.frx":20AD
- Style = 2 'Dropdown List
- TabIndex = 15
- Tag = "Allows you to modify the default alignment position of the graphic"
- Top = 585
- Width = 1815
- End
- Begin VB.Label lblHdr
- AutoSize = -1 'True
- Caption = "PictureOffsetX"
- Height = 195
- Index = 4
- Left = 270
- TabIndex = 16
- Top = 1035
- Width = 1050
- End
- Begin VB.Label lblHdr
- AutoSize = -1 'True
- Caption = "PictureOffsetY"
- Height = 195
- Index = 5
- Left = 270
- TabIndex = 18
- Top = 1665
- Width = 1050
- End
- Begin VB.Label lblHdr
- AutoSize = -1 'True
- Caption = "PictureAlignment:"
- Height = 195
- Index = 6
- Left = 270
- TabIndex = 14
- Top = 360
- Width = 1260
- End
- End
- Begin CommandButtonXDemo.pucLogoPane LogoPane1
- Align = 1 'Align Top
- Height = 780
- Left = 0
- Top = 0
- Width = 6105
- _ExtentX = 10769
- _ExtentY = 1376
- Picture = "Pictures.frx":2153
- End
- Attribute VB_Name = "frmPictures"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- DefInt A-Z
- Private Sub cboAlignmentEx_Click()
- cmdxDemo.PictureAlignment = cboAlignmentEx.ListIndex
- End Sub
- Private Sub cboAlignmentEx_GotFocus()
- tipPicture.Text = cboAlignmentEx.Tag
- End Sub
- Private Sub chkEnabled_Click()
- cmdxDemo.Enabled = chkEnabled
- End Sub
- Private Sub chkEnabled_GotFocus()
- tipPicture.Text = chkEnabled.Tag
- End Sub
- Private Sub cmdAction_Click(Index As Integer)
- Dim File$
- Dim Pic As StdPicture
- With cmdxDemo
- 'property for file
- Select Case Index
- Case 0, 2, 4, 6
- File$ = SelectFile$(hWnd, "Pictures (*.bmp;*.dib;*.ico;*.gif;*.jpg;*.rle;*.wmf)|*.bmp;*.dib;*.gif;*.ico;*.jpg;*.rle;*.wmf|Bitmaps (*.bmp;*.dib;*.rle)|*.bmp;*.dib;*.rle|Icons (*.ico)|*.ico|Windows Metafiles (*.wmf)|*.wmf|Internet Images (*.gif;*.jpg)|*.gif;*.jpg", "bmp", , "Browse Picture")
- If Len(File$) Then
- On Error Resume Next
- Set Pic = LoadPicture(File$)
- If Err Then
- MsgBox Error$
- End If
- On Error GoTo 0
- End If
- End Select
- 'action
- Select Case Index
- Case 0
- If Not Pic Is Nothing Then
- Set .Picture = Pic
- End If
- Case 1: Set .Picture = Nothing
- Case 2
- If Not Pic Is Nothing Then
- Set .DisabledPicture = Pic
- End If
- Case 3: Set .DisabledPicture = Nothing
- Case 4
- If Not Pic Is Nothing Then
- Set .DownPicture = Pic
- End If
- Case 5: Set .DownPicture = Nothing
- Case 6
- If Not Pic Is Nothing Then
- Set .HoverPicture = Pic
- End If
- Case 7: Set .HoverPicture = Nothing
- End Select
- End With
- End Sub
- Private Sub cmdAction_GotFocus(Index As Integer)
- tipPicture.Text = cmdAction(Index).Tag
- End Sub
- Private Sub cmdClose_Click()
- Unload Me
- End Sub
- Private Sub cmdClose_GotFocus()
- tipPicture.Text = cmdClose.Tag
- End Sub
- Private Sub cmdxDemo_GotFocus()
- tipPicture.Text = cmdxDemo.Tag
- End Sub
- Private Sub Form_Load()
- cboAlignmentEx.ListIndex = cmdxDemo.PictureAlignment
- End Sub
- Private Sub hsbX_Change()
- cmdxDemo.PictureOffsetX = hsbX
- End Sub
- Private Sub hsbX_GotFocus()
- tipPicture.Text = hsbX.Tag
- End Sub
- Private Sub hsbX_Scroll()
- hsbX_Change
- End Sub
- Private Sub hsbY_Change()
- cmdxDemo.PictureOffsety = hsbY
- End Sub
- Private Sub hsbY_GotFocus()
- tipPicture.Text = hsbY.Tag
- End Sub
- Private Sub hsbY_Scroll()
- hsbY_Change
- End Sub
-