home *** CD-ROM | disk | FTP | other *** search
/ 500 Game Surplus / XSurplus.iso / 593 / PARM.FR_ / PARM.FR
Text File  |  1996-01-28  |  5KB  |  164 lines

  1. VERSION 4.00
  2. Begin VB.Form frmParms 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Parameters"
  5.    ClientHeight    =   2136
  6.    ClientLeft      =   480
  7.    ClientTop       =   1416
  8.    ClientWidth     =   5844
  9.    ControlBox      =   0   'False
  10.    Height          =   2520
  11.    Left            =   432
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   2136
  16.    ScaleWidth      =   5844
  17.    Top             =   1080
  18.    Width           =   5940
  19.    Begin VB.HScrollBar hsbRelWallHeight 
  20.       Height          =   252
  21.       LargeChange     =   38
  22.       Left            =   2160
  23.       Max             =   400
  24.       Min             =   20
  25.       TabIndex        =   8
  26.       Top             =   1080
  27.       Value           =   200
  28.       Width           =   3372
  29.    End
  30.    Begin VB.HScrollBar hsbRelWallThickness 
  31.       Height          =   252
  32.       LargeChange     =   5
  33.       Left            =   2160
  34.       Max             =   50
  35.       Min             =   20
  36.       TabIndex        =   7
  37.       Top             =   600
  38.       Value           =   25
  39.       Width           =   3372
  40.    End
  41.    Begin VB.HScrollBar hsbAbsWallLength 
  42.       Height          =   252
  43.       LargeChange     =   5
  44.       Left            =   2160
  45.       Max             =   50
  46.       Min             =   20
  47.       TabIndex        =   6
  48.       Top             =   120
  49.       Value           =   25
  50.       Width           =   3372
  51.    End
  52.    Begin VB.CommandButton cmdCancel 
  53.       Cancel          =   -1  'True
  54.       Caption         =   "Cancel"
  55.       Default         =   -1  'True
  56.       Height          =   372
  57.       Left            =   4080
  58.       TabIndex        =   0
  59.       Top             =   1560
  60.       Width           =   1212
  61.    End
  62.    Begin VB.CommandButton cmdDefaults 
  63.       Caption         =   "Defaults"
  64.       Height          =   372
  65.       Left            =   2280
  66.       TabIndex        =   2
  67.       Top             =   1560
  68.       Width           =   1212
  69.    End
  70.    Begin VB.CommandButton cmdOk 
  71.       Caption         =   "Ok"
  72.       Height          =   372
  73.       Left            =   480
  74.       TabIndex        =   1
  75.       Top             =   1560
  76.       Width           =   1212
  77.    End
  78.    Begin VB.Label Label3 
  79.       Alignment       =   1  'Right Justify
  80.       Caption         =   "Relative height of Walls"
  81.       Height          =   252
  82.       Left            =   120
  83.       TabIndex        =   5
  84.       Top             =   1080
  85.       Width           =   1932
  86.    End
  87.    Begin VB.Label Label2 
  88.       Alignment       =   1  'Right Justify
  89.       Caption         =   "Relative thickness of walls"
  90.       Height          =   252
  91.       Left            =   120
  92.       TabIndex        =   4
  93.       Top             =   600
  94.       Width           =   1932
  95.    End
  96.    Begin VB.Label Label1 
  97.       Alignment       =   1  'Right Justify
  98.       Caption         =   "Absolute wall length"
  99.       Height          =   252
  100.       Left            =   120
  101.       TabIndex        =   3
  102.       Top             =   120
  103.       Width           =   1932
  104.    End
  105. End
  106. Attribute VB_Name = "frmParms"
  107. Attribute VB_Creatable = False
  108. Attribute VB_Exposed = False
  109. Option Explicit
  110.  
  111. Dim AbsWallLengthAtEntry As Integer
  112. Dim RelWallHeightAtEntry As Integer
  113. Dim RelWallThicknessAtEntry As Integer
  114. Private Sub cmdCancel_Click()
  115.   Unload frmParms
  116. End Sub
  117.  
  118. Private Sub cmdDefaults_Click()
  119.   hsbAbsWallLength.Value = 25
  120.   hsbRelWallThickness.Value = 25
  121.   hsbRelWallHeight = 200
  122. End Sub
  123.  
  124. Private Sub cmdOk_Click()
  125.   Dim SomethingChanged As Boolean
  126.   Dim TemReal As Double
  127.   SomethingChanged = False
  128.   If hsbAbsWallLength <> AbsWallLengthAtEntry Then
  129.     SomethingChanged = True
  130.     TemReal = hsbAbsWallLength
  131.     frm3DMaze.MinWallLengthInInches = TemReal / 100#
  132.     frm3DMaze.Resize = True
  133.     frm3DMaze.UserHasSolved = False
  134.     frm3DMaze.SolutionDisplayed = False
  135.     frm3DMaze.Seed = Str(Timer)
  136.   End If
  137.   If hsbRelWallThickness <> RelWallThicknessAtEntry Then
  138.     SomethingChanged = True
  139.     TemReal = hsbRelWallThickness
  140.     frm3DMaze.RelativeWidthOfWall = TemReal / 100#
  141.   End If
  142.   If hsbRelWallHeight <> RelWallHeightAtEntry Then
  143.     SomethingChanged = True
  144.     TemReal = hsbRelWallHeight
  145.     frm3DMaze.RelativeHeightOfWall = TemReal / 100#
  146.   End If
  147.   If SomethingChanged Then
  148.     frm3DMaze.Refresh
  149.   End If
  150.   Unload frmParms
  151. End Sub
  152.  
  153.  
  154. Private Sub Form_Load()
  155.   hsbAbsWallLength = Int(100# * frm3DMaze.MinWallLengthInInches)
  156.   AbsWallLengthAtEntry = hsbAbsWallLength
  157.   hsbRelWallThickness = Int(100# * frm3DMaze.RelativeWidthOfWall)
  158.   RelWallThicknessAtEntry = hsbRelWallThickness
  159.   hsbRelWallHeight = Int(100# * frm3DMaze.RelativeHeightOfWall)
  160.   RelWallHeightAtEntry = hsbRelWallHeight
  161. End Sub
  162.  
  163.  
  164.