home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Power Pack / Visual_Basic4_Power_Pack.bin / vb4files / vbmax3d / 3dshadow.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-11-20  |  6.6 KB  |  227 lines

  1. VERSION 4.00
  2. Begin VB.Form frm3DShadows 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "VBMax 3D Effects Demo - Drop Shadows"
  5.    ClientHeight    =   4230
  6.    ClientLeft      =   1995
  7.    ClientTop       =   6120
  8.    ClientWidth     =   6690
  9.    Height          =   4635
  10.    Icon            =   "3DShadows.frx":0000
  11.    Left            =   1935
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4230
  17.    ScaleWidth      =   6690
  18.    ShowInTaskbar   =   0   'False
  19.    Top             =   5775
  20.    Width           =   6810
  21.    Begin VB.Frame Frame3 
  22.       Caption         =   "Effect"
  23.       Height          =   1815
  24.       Left            =   180
  25.       TabIndex        =   14
  26.       Top             =   2280
  27.       Width           =   2955
  28.       Begin VB.HScrollBar sliOffset 
  29.          Height          =   255
  30.          Left            =   1260
  31.          Max             =   10
  32.          Min             =   1
  33.          TabIndex        =   4
  34.          Top             =   1170
  35.          Value           =   10
  36.          Width           =   1515
  37.       End
  38.       Begin VB.CheckBox Check1 
  39.          Caption         =   "Shadow"
  40.          Height          =   255
  41.          Left            =   300
  42.          TabIndex        =   0
  43.          Top             =   360
  44.          Value           =   1  'Checked
  45.          Width           =   1095
  46.       End
  47.       Begin VB.OptionButton optShadow 
  48.          Caption         =   "Light"
  49.          Height          =   255
  50.          Index           =   0
  51.          Left            =   600
  52.          TabIndex        =   1
  53.          Top             =   720
  54.          Value           =   -1  'True
  55.          Width           =   795
  56.       End
  57.       Begin VB.OptionButton optShadow 
  58.          Caption         =   "Dark"
  59.          Height          =   255
  60.          Index           =   1
  61.          Left            =   1620
  62.          TabIndex        =   2
  63.          Top             =   720
  64.          Width           =   795
  65.       End
  66.       Begin VB.Label lblOffset 
  67.          AutoSize        =   -1  'True
  68.          Caption         =   "Offset:"
  69.          Height          =   195
  70.          Left            =   660
  71.          TabIndex        =   3
  72.          Top             =   1200
  73.          Width           =   585
  74.       End
  75.    End
  76.    Begin VB.PictureBox Picture1 
  77.       Appearance      =   0  'Flat
  78.       AutoSize        =   -1  'True
  79.       BackColor       =   &H80000005&
  80.       ForeColor       =   &H80000008&
  81.       Height          =   510
  82.       Left            =   3360
  83.       Picture         =   "3DShadows.frx":000C
  84.       ScaleHeight     =   480
  85.       ScaleWidth      =   480
  86.       TabIndex        =   13
  87.       TabStop         =   0   'False
  88.       Top             =   1260
  89.       Width           =   510
  90.    End
  91.    Begin VB.FileListBox File1 
  92.       Appearance      =   0  'Flat
  93.       Height          =   615
  94.       Left            =   180
  95.       TabIndex        =   12
  96.       TabStop         =   0   'False
  97.       Top             =   1080
  98.       Width           =   1215
  99.    End
  100.    Begin VB.DirListBox Dir1 
  101.       Appearance      =   0  'Flat
  102.       Height          =   705
  103.       Left            =   180
  104.       TabIndex        =   11
  105.       TabStop         =   0   'False
  106.       Top             =   180
  107.       Width           =   1215
  108.    End
  109.    Begin VB.VScrollBar VScroll1 
  110.       Height          =   1215
  111.       Left            =   4740
  112.       TabIndex        =   10
  113.       TabStop         =   0   'False
  114.       Top             =   180
  115.       Width           =   255
  116.    End
  117.    Begin VB.HScrollBar HScroll1 
  118.       Height          =   255
  119.       Left            =   5280
  120.       TabIndex        =   9
  121.       TabStop         =   0   'False
  122.       Top             =   300
  123.       Width           =   1215
  124.    End
  125.    Begin VB.ComboBox Combo1 
  126.       Appearance      =   0  'Flat
  127.       Height          =   765
  128.       Left            =   3180
  129.       Style           =   1  'Simple Combo
  130.       TabIndex        =   8
  131.       TabStop         =   0   'False
  132.       Text            =   "Combo1"
  133.       Top             =   180
  134.       Width           =   1215
  135.    End
  136.    Begin VB.CommandButton cmdClose 
  137.       Cancel          =   -1  'True
  138.       Caption         =   "Close"
  139.       Height          =   495
  140.       Left            =   5160
  141.       TabIndex        =   5
  142.       Top             =   3480
  143.       Width           =   1215
  144.    End
  145.    Begin VB.TextBox Text1 
  146.       Appearance      =   0  'Flat
  147.       Height          =   495
  148.       Left            =   1740
  149.       TabIndex        =   6
  150.       TabStop         =   0   'False
  151.       Text            =   "Text1"
  152.       Top             =   900
  153.       Width           =   1215
  154.    End
  155.    Begin VB.Line Line1 
  156.       X1              =   120
  157.       X2              =   6540
  158.       Y1              =   2100
  159.       Y2              =   2100
  160.    End
  161.    Begin VB.Label Label1 
  162.       Appearance      =   0  'Flat
  163.       BackColor       =   &H80000005&
  164.       BorderStyle     =   1  'Fixed Single
  165.       Caption         =   "Label1"
  166.       ForeColor       =   &H80000008&
  167.       Height          =   495
  168.       Left            =   1740
  169.       TabIndex        =   7
  170.       Top             =   180
  171.       Width           =   1215
  172.    End
  173. Attribute VB_Name = "frm3DShadows"
  174. Attribute VB_Creatable = False
  175. Attribute VB_Exposed = False
  176. Option Explicit
  177. Dim mo3D    As New cls3D
  178. Dim mbEffects As Boolean
  179. Private Sub cmdClose_Click()
  180.     Unload Me
  181. End Sub
  182. Private Sub Form_Load()
  183.     Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
  184.     mbEffects = True
  185.     mo3D.Style = gnRECESSED
  186.     mo3D.Offset = sliOffset.Value
  187.     DrawShadows
  188. End Sub
  189. Private Sub Form_Unload(Cancel As Integer)
  190.     Set mo3D = Nothing
  191.     Set frm3DShadows = Nothing
  192. End Sub
  193. Private Sub DrawShadows()
  194.     Cls
  195.     mo3D.Line3D Line1
  196.     If Not mbEffects Then Exit Sub
  197.     With mo3D
  198.         .DropShadow Text1
  199.         .DropShadow Label1
  200.         .DropShadow HScroll1
  201.         .DropShadow VScroll1
  202.         .DropShadow Combo1
  203.         .DropShadow Dir1
  204.         .DropShadow File1
  205.         .DropShadow Picture1
  206.     End With
  207. End Sub
  208. Private Sub Check1_Click()
  209.     If Check1.Value = vbChecked Then
  210.         mbEffects = True
  211.     Else
  212.         mbEffects = False
  213.     End If
  214.     DrawShadows
  215. End Sub
  216. Private Sub optShadow_Click(Index As Integer)
  217.     Select Case Index
  218.         Case 0: mo3D.Shadow = gnLIGHT_SHADOW
  219.         Case 1: mo3D.Shadow = gnDARK_SHADOW
  220.     End Select
  221.     DrawShadows
  222. End Sub
  223. Private Sub sliOffset_Change()
  224.     mo3D.Offset = sliOffset.Value
  225.     DrawShadows
  226. End Sub
  227.