home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_code1
/
my_mem
/
mymemory.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1992-01-27
|
12KB
|
228 lines
MyMemory
Your Memory Is What?
wwwwwwww
wwwwwww
Form1/
MyMemory
Z FieldDesc
LabelFieldStatus
LabelSquareStatus
MenuGame
&Game
MenuNew
&New Game
MenuSettings
&Settings
MenuShowRecord
Show &Record
MenuSepBar
MenuExit
E&xit
MenuHelp
&Help
FloodFill
Color
HORZRES3
VERTRES
GetDeviceCaps{
nIndex
Form_Load
NumberXSquares
DefaultXSquares
NumberYSquaress
DefaultYSquaresi
SquareSize2
DefaultSquareSize
SetTimer
DefaultTimern
SaveFile{
SelectSaveFileNo
SaveScore
UNCHECKED
ScoreArray
NoScore
ScreenPixelSizeX
ScreenPixelSizeY
SaveFileChange
FALSEj
MyProfile
SquareStatusArray
SquareSceneArray
FieldStatus
FieldNotReady
ResizeMyMemoryForm
Form_MouseDown
Button
Shift
LEFT_BUTTON3
FieldReady
FieldClosed
Scenev
CurrentSquare@
ShowSquare
CurrentSquare1D
CurrentSquare1XP
CurrentSquare1YU
SquareOpen
LabelSquareStatusv
Caption
MyTimer
BuildSquare
SquareClosed
SquareSolved'
CurrentSolved
CurrentMoves?
LabelFieldStatus
MoveWordH
SaveMyScore
FieldSolved
InitFieldY
MenuExit_ClickI
Response
MB_YESNO
IDYES
SaveMyProfile\
MenuNew_Click
Timerval
Start
Finish
current
GRAY_LIGHT
BLACK
Color2
WHITE
YELLOW`
GREEN
MAGENTA
FillColor
FillStyle
SOLID
TRANSPARENT^
CurrentX
CurrentYx
MenuHelp_Click
MyHelp
MenuSettings_Click
MousePointer
HOURGLASS
MySet
OptionH8
Value
TRUE*
OptionH107
OptionH12
OptionH14
OptionH16
OptionH18
OptionV6Q
OptionV8D
OptionV10j
OptionP32
OptionP40
OptionP48
OptionS1=
OptionS2S
OptionS3
OptionS4
OptionS5
OptionSaveNo
CheckScore
Enabled
SelectSaveFileWIN
OptionSaveWIN#
SelectSaveFileWEP
OptionSaveWEPn
SelectSaveFileMy
OptionSaveMy
FieldY
MyMemory
Height
FieldDesc
FormHeader
TwipsPerPixel
DEFAULT
MODAL
Form_Paint
MenuShowRecord_Click
PGame
PScore
PName
ScoreArrayName
Form_Unload
Cancel
From example in VB Language Reference manual page 141
Needed to get physical size of screen (from WINAPI.TXT)
Form_Load
initialize user settings, in case no profile
Indicate no change to Game Setup since beginning or after reading profileF
See if there is a game setup (profile) in an INI filef
Change array size to match number of squares, especially if MyProfile changed size
indicate game not startedh
set form size - Form set smaller during development because
it was easier to work with
Form_MouseDown
Get X and Y offsets for scene and status variable arrays
Get X and Y pixel offsets for square
Process left button click, ignore right or middle button
is game in progress
process square only if closed, ignore if open with scene
open square and show scene, but don't allow a third to show
before processing first two (if you click ahead 3 times)
get first square of pair
get second square of pair and see if they match
Squares do not Match!"
give VB time to display caption
Squares Match!
after showing second square, reset and updatec
You have made"
moves."
see if user solved available number of pairs
Game Solved"
Field not ready or solved, go build fieldi
MenuExit_Click
Do you really want to quit?"
MenuNew_Click
If game started, see if user really wants to quit
You haven't finished playing the current game!
Do you really want to start a new game?"
New Game
Status not ready, solved or user wanted new game
MyTimer
wait seconds asked for by caller
ShowSquare
clear the square first
set offset to center
set size of object, size% is offset from center
Select Color
now show scene
draw square, no fill color
draw square, filled
draw circle, no fill color
draw circle, filled
draw triangle, no fill color
draw triangle, filled
draw upside down triangle, no fill color
draw upside down triangle, filled
draw diamond, no fill color
draw diamond, filled
draw double square, filled
draw double circle, filled
In case I missed one
MenuHelp_Click
MenuSettings_Click
Tell player to waite
load in the dialog box but don't show
Reflect current number of squares in the X direction
Reflect current number of squares in the Y direction
Reflect current size of squarese
Reflect current timer valuea
Reflect current settings file if any
Disable invalid X, Y and Square sizes
Tell player we're thru
now show the form
Form_Paint
Build existing game, SquareOpen should not be a problem
because its status will soon changeu
MenuShowRecord_Click
Form_Unload