vbAccelerator - Contents of code file: frmGridLineSettings.frm

VERSION 5.00
Begin VB.Form frmGridLineSettings 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Grid Line Settings"
   ClientHeight    =   1665
   ClientLeft      =   4425
   ClientTop       =   4095
   ClientWidth     =   3660
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmGridLineSettings.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1665
   ScaleWidth      =   3660
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "Cancel"
      Height          =   375
      Left            =   2460
      TabIndex        =   8
      Top             =   480
      Width           =   1095
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "OK"
      Default         =   -1  'True
      Height          =   375
      Left            =   2460
      TabIndex        =   7
      Top             =   60
      Width           =   1095
   End
   Begin VB.CheckBox chkTileGrid 
      Caption         =   "&Tile Grid"
      Height          =   255
      Left            =   240
      TabIndex        =   1
      Top             =   360
      Value           =   1  'Checked
      Width           =   915
   End
   Begin VB.CheckBox chkPixelGrid 
      Caption         =   "&Pixel Grid"
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   60
      Value           =   1  'Checked
      Width           =   1995
   End
   Begin VB.Frame fraGrid 
      Height          =   1155
      Left            =   120
      TabIndex        =   2
      Top             =   420
      Width           =   2235
      Begin VB.TextBox txtHeight 
         Height          =   315
         Left            =   840
         MaxLength       =   3
         TabIndex        =   6
         Text            =   "16"
         Top             =   660
         Width           =   1155
      End
      Begin VB.TextBox txtWidth 
         Height          =   315
         Left            =   840
         MaxLength       =   3
         TabIndex        =   4
         Text            =   "16"
         Top             =   300
         Width           =   1155
      End
      Begin VB.Label lblHeight 
         Caption         =   "&Height:"
         Height          =   315
         Left            =   180
         TabIndex        =   5
         Top             =   720
         Width           =   735
      End
      Begin VB.Label lblWidth 
         Caption         =   "&Width:"
         Height          =   315
         Left            =   180
         TabIndex        =   3
         Top             =   360
         Width           =   735
      End
   End
End
Attribute VB_Name = "frmGridLineSettings"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private m_bPixelGrid As Boolean
Private m_bTileGrid As Boolean
Private m_lTileX As Long
Private m_lTileY As Long
Private m_bCancel As Boolean

Public Property Get Cancelled() As Boolean
   Cancelled = m_bCancel
End Property

Public Sub SetValues(bPixelGrid As Boolean, bTileGrid As Boolean, lTileX As
 Long, lTileY As Long)
   m_bPixelGrid = bPixelGrid
   m_bTileGrid = bTileGrid
   m_lTileX = lTileX
   m_lTileY = lTileY
End Sub
Public Sub GetValues(bPixelGrid As Boolean, bTileGrid As Boolean, lTileX As
 Long, lTileY As Long)
   bPixelGrid = m_bPixelGrid
   bTileGrid = m_bTileGrid
   lTileX = m_lTileX
   lTileY = m_lTileY
End Sub

Private Sub chkTileGrid_Click()
Dim bS As Boolean
   bS = (chkTileGrid.Value = Checked)
   txtWidth.Enabled = bS
   txtHeight.Enabled = bS
End Sub

Private Sub cmdCancel_Click()
   m_bCancel = True
   Unload Me
End Sub

Private Sub cmdOK_Click()
   m_bTileGrid = (chkTileGrid.Value = Checked)
   m_bPixelGrid = (chkPixelGrid.Value = Checked)
   m_lTileX = Val(txtWidth.Text)
   m_lTileY = Val(txtHeight.Text)
   Unload Me
End Sub

Private Sub Form_Load()
   chkPixelGrid.Value = Abs(m_bPixelGrid)
   chkTileGrid.Value = Abs(m_bTileGrid)
   chkTileGrid_Click
End Sub

Private Sub txtHeight_KeyPress(KeyAscii As Integer)
Dim sC As String
   sC = Chr$(KeyAscii)
   If Not IsNumeric(sC) Then
      KeyAscii = 0
   End If
End Sub

Private Sub txtWidth_KeyPress(KeyAscii As Integer)
Dim sC As String
   sC = Chr$(KeyAscii)
   If Not IsNumeric(sC) Then
      KeyAscii = 0
   End If
End Sub