home *** CD-ROM | disk | FTP | other *** search
/ The Best of Windows 95.com 1996 September / WIN95_09964.iso / program / vbmax3d.zip / 3DPanels.frm (.txt) < prev    next >
Visual Basic Form  |  1996-07-06  |  5KB  |  179 lines

  1. VERSION 4.00
  2. Begin VB.Form frm3DPanels 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "VBMax 3D Effects Demo - Panels"
  5.    ClientHeight    =   4605
  6.    ClientLeft      =   1050
  7.    ClientTop       =   1740
  8.    ClientWidth     =   5610
  9.    Height          =   5010
  10.    Icon            =   "3DPanels.frx":0000
  11.    Left            =   990
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4605
  17.    ScaleWidth      =   5610
  18.    ShowInTaskbar   =   0   'False
  19.    Top             =   1395
  20.    Width           =   5730
  21.    Begin VB.Frame Frame1 
  22.       Caption         =   "Size"
  23.       Height          =   1815
  24.       Left            =   120
  25.       TabIndex        =   0
  26.       Top             =   2700
  27.       Width           =   1815
  28.       Begin VB.VScrollBar sliWidth 
  29.          Height          =   1095
  30.          Left            =   270
  31.          Max             =   10
  32.          TabIndex        =   2
  33.          Top             =   600
  34.          Width           =   255
  35.       End
  36.       Begin VB.VScrollBar sliDepth 
  37.          Height          =   1095
  38.          Left            =   1140
  39.          Max             =   10
  40.          TabIndex        =   4
  41.          Top             =   600
  42.          Value           =   1
  43.          Width           =   255
  44.       End
  45.       Begin VB.Label lblDepth 
  46.          AutoSize        =   -1  'True
  47.          Caption         =   "&Depth:"
  48.          Height          =   195
  49.          Left            =   1080
  50.          TabIndex        =   3
  51.          Top             =   300
  52.          Width           =   480
  53.       End
  54.       Begin VB.Label lblWidth 
  55.          AutoSize        =   -1  'True
  56.          Caption         =   "&Width:"
  57.          Height          =   195
  58.          Left            =   210
  59.          TabIndex        =   1
  60.          Top             =   300
  61.          Width           =   465
  62.       End
  63.    End
  64.    Begin VB.Frame Frame2 
  65.       Caption         =   "Style"
  66.       Height          =   1275
  67.       Left            =   2220
  68.       TabIndex        =   5
  69.       Top             =   2700
  70.       Width           =   1635
  71.       Begin VB.OptionButton optRecessed 
  72.          Caption         =   "R&ecessed"
  73.          Height          =   375
  74.          Left            =   240
  75.          TabIndex        =   7
  76.          Top             =   720
  77.          Width           =   1215
  78.       End
  79.       Begin VB.OptionButton optRaised 
  80.          Caption         =   "&Raised"
  81.          Height          =   375
  82.          Left            =   240
  83.          TabIndex        =   6
  84.          Top             =   360
  85.          Value           =   -1  'True
  86.          Width           =   1095
  87.       End
  88.    End
  89.    Begin VB.CommandButton cmdClose 
  90.       Cancel          =   -1  'True
  91.       Caption         =   "Close"
  92.       Height          =   360
  93.       Left            =   4320
  94.       TabIndex        =   8
  95.       Top             =   4140
  96.       Width           =   900
  97.    End
  98.    Begin VB.Shape Shape3 
  99.       Height          =   795
  100.       Left            =   2040
  101.       Top             =   360
  102.       Width           =   1935
  103.    End
  104.    Begin VB.Shape Shape4 
  105.       Height          =   1695
  106.       Left            =   4800
  107.       Top             =   360
  108.       Width           =   195
  109.    End
  110.    Begin VB.Shape Shape2 
  111.       Height          =   615
  112.       Left            =   600
  113.       Top             =   360
  114.       Width           =   675
  115.    End
  116.    Begin VB.Shape Shape1 
  117.       Height          =   255
  118.       Left            =   420
  119.       Top             =   1860
  120.       Width           =   3615
  121.    End
  122.    Begin VB.Line Line1 
  123.       X1              =   60
  124.       X2              =   5520
  125.       Y1              =   2520
  126.       Y2              =   2520
  127.    End
  128. Attribute VB_Name = "frm3DPanels"
  129. Attribute VB_Creatable = False
  130. Attribute VB_Exposed = False
  131. Option Explicit
  132. Dim mo3D      As New C3D
  133. Dim mo3DLines As New C3D
  134. Private Sub Form_Load()
  135.     CenterForm Me
  136.     With mo3D
  137.         .Depth = sliDepth.Value
  138.         .Width = sliWidth.Value
  139.         .Style = gnRAISED
  140.     End With
  141.     Draw3D
  142. End Sub
  143. Private Sub Form_Unload(Cancel As Integer)
  144.     Set mo3D = Nothing
  145.     Set mo3DLines = Nothing
  146.     Set frm3DPanels = Nothing
  147. End Sub
  148. Private Sub optRaised_Click()
  149.     mo3D.Style = gnRAISED
  150.     Draw3D
  151. End Sub
  152. Private Sub optRecessed_Click()
  153.     mo3D.Style = gnRECESSED
  154.     Draw3D
  155. End Sub
  156. Private Sub cmdClose_Click()
  157.     Unload Me
  158. End Sub
  159. Private Sub sliDepth_Change()
  160.     mo3D.Depth = sliDepth.Value
  161.     Draw3D
  162. End Sub
  163. Private Sub sliWidth_Change()
  164.     mo3D.Width = sliWidth.Value
  165.     Draw3D
  166. End Sub
  167. Private Sub Draw3D()
  168.     Cls
  169.     mo3DLines.Line3D Line1
  170.     With mo3D
  171.         If .Style <> gnNORMAL Then
  172.             .Panel Shape1
  173.             .Panel Shape2
  174.             .Panel Shape3
  175.             .Panel Shape4
  176.         End If
  177.     End With
  178. End Sub
  179.