home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frm3DShadows
- BorderStyle = 3 'Fixed Dialog
- Caption = "VBMax 3D Effects Demo - Drop Shadows"
- ClientHeight = 4230
- ClientLeft = 1995
- ClientTop = 6120
- ClientWidth = 6690
- Height = 4635
- Icon = "3DShadows.frx":0000
- Left = 1935
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4230
- ScaleWidth = 6690
- ShowInTaskbar = 0 'False
- Top = 5775
- Width = 6810
- Begin VB.Frame Frame3
- Caption = "Effect"
- Height = 1815
- Left = 180
- TabIndex = 14
- Top = 2280
- Width = 2955
- Begin VB.HScrollBar sliOffset
- Height = 255
- Left = 1260
- Max = 10
- Min = 1
- TabIndex = 4
- Top = 1170
- Value = 10
- Width = 1515
- End
- Begin VB.CheckBox Check1
- Caption = "Shadow"
- Height = 255
- Left = 300
- TabIndex = 0
- Top = 360
- Value = 1 'Checked
- Width = 1095
- End
- Begin VB.OptionButton optShadow
- Caption = "Light"
- Height = 255
- Index = 0
- Left = 600
- TabIndex = 1
- Top = 720
- Value = -1 'True
- Width = 795
- End
- Begin VB.OptionButton optShadow
- Caption = "Dark"
- Height = 255
- Index = 1
- Left = 1620
- TabIndex = 2
- Top = 720
- Width = 795
- End
- Begin VB.Label lblOffset
- AutoSize = -1 'True
- Caption = "Offset:"
- Height = 195
- Left = 660
- TabIndex = 3
- Top = 1200
- Width = 585
- End
- End
- Begin VB.PictureBox Picture1
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000005&
- ForeColor = &H80000008&
- Height = 510
- Left = 3360
- Picture = "3DShadows.frx":000C
- ScaleHeight = 480
- ScaleWidth = 480
- TabIndex = 13
- TabStop = 0 'False
- Top = 1260
- Width = 510
- End
- Begin VB.FileListBox File1
- Appearance = 0 'Flat
- Height = 615
- Left = 180
- TabIndex = 12
- TabStop = 0 'False
- Top = 1080
- Width = 1215
- End
- Begin VB.DirListBox Dir1
- Appearance = 0 'Flat
- Height = 705
- Left = 180
- TabIndex = 11
- TabStop = 0 'False
- Top = 180
- Width = 1215
- End
- Begin VB.VScrollBar VScroll1
- Height = 1215
- Left = 4740
- TabIndex = 10
- TabStop = 0 'False
- Top = 180
- Width = 255
- End
- Begin VB.HScrollBar HScroll1
- Height = 255
- Left = 5280
- TabIndex = 9
- TabStop = 0 'False
- Top = 300
- Width = 1215
- End
- Begin VB.ComboBox Combo1
- Appearance = 0 'Flat
- Height = 765
- Left = 3180
- Style = 1 'Simple Combo
- TabIndex = 8
- TabStop = 0 'False
- Text = "Combo1"
- Top = 180
- Width = 1215
- End
- Begin VB.CommandButton cmdClose
- Cancel = -1 'True
- Caption = "Close"
- Height = 495
- Left = 5160
- TabIndex = 5
- Top = 3480
- Width = 1215
- End
- Begin VB.TextBox Text1
- Appearance = 0 'Flat
- Height = 495
- Left = 1740
- TabIndex = 6
- TabStop = 0 'False
- Text = "Text1"
- Top = 900
- Width = 1215
- End
- Begin VB.Line Line1
- X1 = 120
- X2 = 6540
- Y1 = 2100
- Y2 = 2100
- End
- Begin VB.Label Label1
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- ForeColor = &H80000008&
- Height = 495
- Left = 1740
- TabIndex = 7
- Top = 180
- Width = 1215
- End
- Attribute VB_Name = "frm3DShadows"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Dim mo3D As New cls3D
- Dim mbEffects As Boolean
- Private Sub cmdClose_Click()
- Unload Me
- End Sub
- Private Sub Form_Load()
- Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
- mbEffects = True
- mo3D.Style = gnRECESSED
- mo3D.Offset = sliOffset.Value
- DrawShadows
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Set mo3D = Nothing
- Set frm3DShadows = Nothing
- End Sub
- Private Sub DrawShadows()
- Cls
- mo3D.Line3D Line1
- If Not mbEffects Then Exit Sub
- With mo3D
- .DropShadow Text1
- .DropShadow Label1
- .DropShadow HScroll1
- .DropShadow VScroll1
- .DropShadow Combo1
- .DropShadow Dir1
- .DropShadow File1
- .DropShadow Picture1
- End With
- End Sub
- Private Sub Check1_Click()
- If Check1.Value = vbChecked Then
- mbEffects = True
- Else
- mbEffects = False
- End If
- DrawShadows
- End Sub
- Private Sub optShadow_Click(Index As Integer)
- Select Case Index
- Case 0: mo3D.Shadow = gnLIGHT_SHADOW
- Case 1: mo3D.Shadow = gnDARK_SHADOW
- End Select
- DrawShadows
- End Sub
- Private Sub sliOffset_Change()
- mo3D.Offset = sliOffset.Value
- DrawShadows
- End Sub
-