home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 September
/
Chip_1999-09_cd.bin
/
sharewar
/
vbintrod
/
projects
/
example.frm
(
.txt
)
next >
Wrap
Visual Basic Form
|
1999-06-04
|
11KB
|
378 lines
VERSION 5.00
Begin VB.Form frmExample
Caption = "Example Program"
ClientHeight = 6225
ClientLeft = 1530
ClientTop = 1470
ClientWidth = 7500
LinkTopic = "Form1"
PaletteMode = 1 'UseZOrder
ScaleHeight = 6225
ScaleWidth = 7500
Begin VB.CommandButton cmdExit
Caption = "E&xit"
Height = 495
Left = 5160
TabIndex = 20
Top = 360
Width = 1215
End
Begin VB.CommandButton cmdStart
Caption = "Start"
Height = 495
Left = 5160
TabIndex = 19
Top = 2760
Width = 1215
End
Begin VB.Frame framColour
Caption = "Your Fovourite Colour?"
Height = 615
Left = 240
TabIndex = 13
Top = 5400
Width = 6255
Begin VB.OptionButton optBlack
Caption = "Black"
Height = 255
Left = 5040
TabIndex = 18
Top = 240
Width = 975
End
Begin VB.OptionButton optGreen
Caption = "Green"
Height = 255
Left = 3840
TabIndex = 17
Top = 240
Width = 975
End
Begin VB.OptionButton optBlue
Caption = "Blue"
Height = 255
Left = 2640
TabIndex = 16
Top = 240
Width = 975
End
Begin VB.OptionButton optYellow
Caption = "Yellow"
Height = 255
Left = 1440
TabIndex = 15
Top = 240
Width = 975
End
Begin VB.OptionButton optRed
Caption = "Red"
Height = 255
Left = 240
TabIndex = 14
Top = 240
Width = 975
End
End
Begin VB.TextBox txtMessage
Height = 975
Left = 3240
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 11
Top = 4080
Width = 3015
End
Begin VB.Frame framAge
Caption = "How Old Are You?"
Height = 1335
Left = 240
TabIndex = 8
Top = 3840
Width = 2535
Begin VB.TextBox txtAge
Alignment = 2 'Center
Height = 285
Left = 840
MultiLine = -1 'True
TabIndex = 10
Text = "example.frx":0000
Top = 360
Width = 855
End
Begin VB.HScrollBar hsbAge
Height = 255
LargeChange = 5
Left = 240
Max = 100
TabIndex = 9
Top = 840
Width = 2055
End
End
Begin VB.Timer tmrLights
Interval = 1000
Left = 5520
Top = 1920
End
Begin VB.CommandButton cmdBeep
Caption = "Press Me!"
Height = 495
Left = 5160
TabIndex = 7
Top = 1080
Width = 1215
End
Begin VB.Frame framPictures
Caption = "Pictures"
Height = 3375
Left = 240
TabIndex = 0
Top = 240
Width = 1455
Begin VB.CheckBox chkTree
Caption = "Tree"
Height = 375
Left = 240
TabIndex = 6
Top = 2760
Width = 975
End
Begin VB.CheckBox chkRose
Caption = "Rose"
Height = 375
Left = 240
TabIndex = 5
Top = 2280
Width = 975
End
Begin VB.CheckBox chkOwl
Caption = "Owl"
Height = 375
Left = 240
TabIndex = 4
Top = 1800
Width = 975
End
Begin VB.CheckBox chkClown
Caption = "Clown"
Height = 375
Left = 240
TabIndex = 3
Top = 1320
Width = 975
End
Begin VB.CheckBox chkCastle
Caption = "Castle"
Height = 375
Left = 240
TabIndex = 2
Top = 840
Width = 975
End
Begin VB.CheckBox chkCar
Caption = "Car"
Height = 375
Left = 240
TabIndex = 1
Top = 360
Width = 975
End
End
Begin VB.Frame framMessage
Caption = "Type Your Message Here:"
Height = 1335
Left = 3000
TabIndex = 12
Top = 3840
Width = 3495
End
Begin VB.Image imgTree
BorderStyle = 1 'Fixed Single
Height = 735
Left = 3000
Picture = "example.frx":0002
Stretch = -1 'True
Top = 2520
Visible = 0 'False
Width = 735
End
Begin VB.Image imgRose
BorderStyle = 1 'Fixed Single
Height = 735
Left = 2040
Picture = "example.frx":0801
Stretch = -1 'True
Top = 2520
Visible = 0 'False
Width = 735
End
Begin VB.Image imgOwl
BorderStyle = 1 'Fixed Single
Height = 735
Left = 3000
Picture = "example.frx":0FC2
Stretch = -1 'True
Top = 1440
Visible = 0 'False
Width = 735
End
Begin VB.Image imgClown
BorderStyle = 1 'Fixed Single
Height = 735
Left = 2040
Picture = "example.frx":16B5
Stretch = -1 'True
Top = 1440
Visible = 0 'False
Width = 735
End
Begin VB.Image imgCar
BorderStyle = 1 'Fixed Single
Height = 735
Left = 2040
Picture = "example.frx":1FBA
Stretch = -1 'True
Top = 360
Visible = 0 'False
Width = 735
End
Begin VB.Image imgCastle
BorderStyle = 1 'Fixed Single
Height = 735
Left = 3000
Picture = "example.frx":28A6
Stretch = -1 'True
Top = 360
Visible = 0 'False
Width = 735
End
Begin VB.Image imgDisplay
Height = 1335
Left = 4080
Top = 1920
Width = 615
End
Begin VB.Image imgLights
Height = 1350
Index = 3
Left = 6720
Picture = "example.frx":2F0D
Top = 4440
Visible = 0 'False
Width = 750
End
Begin VB.Image imgLights
Height = 1350
Index = 2
Left = 6720
Picture = "example.frx":3967
Top = 3000
Visible = 0 'False
Width = 750
End
Begin VB.Image imgLights
Height = 1350
Index = 1
Left = 6720
Picture = "example.frx":43C1
Top = 1560
Visible = 0 'False
Width = 750
End
Begin VB.Image imgLights
Height = 1350
Index = 0
Left = 6720
Picture = "example.frx":4E1B
Top = 120
Visible = 0 'False
Width = 750
End
Attribute VB_Name = "frmExample"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Counter As Integer
Dim StopGo As Integer
Private Sub chkCar_Click()
If imgCar.Visible = False Then
imgCar.Visible = True
imgCar.Visible = False
End If
End Sub
Private Sub chkCastle_Click()
If imgCastle.Visible = False Then
imgCastle.Visible = True
imgCastle.Visible = False
End If
End Sub
Private Sub cmdBeep_Click()
End Sub
Private Sub chkClown_Click()
If imgClown.Visible = False Then
imgClown.Visible = True
imgClown.Visible = False
End If
End Sub
Private Sub chkOwl_Click()
If imgOwl.Visible = False Then
imgOwl.Visible = True
imgOwl.Visible = False
End If
End Sub
Private Sub chkRose_Click()
If imgRose.Visible = False Then
imgRose.Visible = True
imgRose.Visible = False
End If
End Sub
Private Sub chkTree_Click()
If imgTree.Visible = False Then
imgTree.Visible = True
imgTree.Visible = False
End If
End Sub
Private Sub cmdExit_Click()
End Sub
Private Sub cmdStart_Click()
If StopGo = 0 Then
StopGo = 1
cmdStart.Caption = "Stop"
StopGo = 0
cmdStart.Caption = "Start"
End If
End Sub
Private Sub Form_Load()
Counter = 0
StopGo = 0
End Sub
Private Sub hsbAge_Change()
txtAge.Text = Val(hsbAge)
End Sub
Private Sub optBlack_Click()
frmExample.BackColor = vbBlack
End Sub
Private Sub optBlue_Click()
frmExample.BackColor = vbBlue
End Sub
Private Sub optGreen_Click()
frmExample.BackColor = vbGreen
End Sub
Private Sub optRed_Click()
frmExample.BackColor = vbRed
End Sub
Private Sub optYellow_Click()
frmExample.BackColor = vbYellow
End Sub
Private Sub tmrLights_Timer()
If StopGo = 1 Then
imgDisplay.Picture = imgLights(Counter).Picture
Counter = Counter + 1
If Counter = 4 Then
Counter = 0
End If
End If
End Sub