home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 September / Chip_1999-09_cd.bin / sharewar / vbintro4 / projects / example.frm (.txt) next >
Visual Basic Form  |  1999-04-28  |  11KB  |  379 lines

  1. VERSION 4.00
  2. Begin VB.Form frmExample 
  3.    Caption         =   "Example Program"
  4.    ClientHeight    =   6225
  5.    ClientLeft      =   1530
  6.    ClientTop       =   1470
  7.    ClientWidth     =   7500
  8.    Height          =   6630
  9.    Left            =   1470
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   6225
  12.    ScaleWidth      =   7500
  13.    Top             =   1125
  14.    Width           =   7620
  15.    Begin VB.CommandButton cmdExit 
  16.       Caption         =   "E&xit"
  17.       Height          =   495
  18.       Left            =   5160
  19.       TabIndex        =   20
  20.       Top             =   360
  21.       Width           =   1215
  22.    End
  23.    Begin VB.CommandButton cmdStart 
  24.       Caption         =   "Start"
  25.       Height          =   495
  26.       Left            =   5160
  27.       TabIndex        =   19
  28.       Top             =   2760
  29.       Width           =   1215
  30.    End
  31.    Begin VB.Frame framColour 
  32.       Caption         =   "Your Fovourite Colour?"
  33.       Height          =   615
  34.       Left            =   240
  35.       TabIndex        =   13
  36.       Top             =   5400
  37.       Width           =   6255
  38.       Begin VB.OptionButton optBlack 
  39.          Caption         =   "Black"
  40.          Height          =   255
  41.          Left            =   5040
  42.          TabIndex        =   18
  43.          Top             =   240
  44.          Width           =   975
  45.       End
  46.       Begin VB.OptionButton optGreen 
  47.          Caption         =   "Green"
  48.          Height          =   255
  49.          Left            =   3840
  50.          TabIndex        =   17
  51.          Top             =   240
  52.          Width           =   975
  53.       End
  54.       Begin VB.OptionButton optBlue 
  55.          Caption         =   "Blue"
  56.          Height          =   255
  57.          Left            =   2640
  58.          TabIndex        =   16
  59.          Top             =   240
  60.          Width           =   975
  61.       End
  62.       Begin VB.OptionButton optYellow 
  63.          Caption         =   "Yellow"
  64.          Height          =   255
  65.          Left            =   1440
  66.          TabIndex        =   15
  67.          Top             =   240
  68.          Width           =   975
  69.       End
  70.       Begin VB.OptionButton optRed 
  71.          Caption         =   "Red"
  72.          Height          =   255
  73.          Left            =   240
  74.          TabIndex        =   14
  75.          Top             =   240
  76.          Width           =   975
  77.       End
  78.    End
  79.    Begin VB.TextBox txtMessage 
  80.       Height          =   975
  81.       Left            =   3240
  82.       MultiLine       =   -1  'True
  83.       ScrollBars      =   2  'Vertical
  84.       TabIndex        =   11
  85.       Top             =   4080
  86.       Width           =   3015
  87.    End
  88.    Begin VB.Frame framAge 
  89.       Caption         =   "How Old Are You?"
  90.       Height          =   1335
  91.       Left            =   240
  92.       TabIndex        =   8
  93.       Top             =   3840
  94.       Width           =   2535
  95.       Begin VB.TextBox txtAge 
  96.          Alignment       =   2  'Center
  97.          Height          =   285
  98.          Left            =   840
  99.          MultiLine       =   -1  'True
  100.          TabIndex        =   10
  101.          Text            =   "example.frx":0000
  102.          Top             =   360
  103.          Width           =   855
  104.       End
  105.       Begin VB.HScrollBar hsbAge 
  106.          Height          =   255
  107.          LargeChange     =   5
  108.          Left            =   240
  109.          Max             =   100
  110.          TabIndex        =   9
  111.          Top             =   840
  112.          Width           =   2055
  113.       End
  114.    End
  115.    Begin VB.Timer tmrLights 
  116.       Interval        =   1000
  117.       Left            =   5520
  118.       Top             =   1920
  119.    End
  120.    Begin VB.CommandButton cmdBeep 
  121.       Caption         =   "Press Me!"
  122.       Height          =   495
  123.       Left            =   5160
  124.       TabIndex        =   7
  125.       Top             =   1080
  126.       Width           =   1215
  127.    End
  128.    Begin VB.Frame framPictures 
  129.       Caption         =   "Pictures"
  130.       Height          =   3375
  131.       Left            =   240
  132.       TabIndex        =   0
  133.       Top             =   240
  134.       Width           =   1455
  135.       Begin VB.CheckBox chkTree 
  136.          Caption         =   "Tree"
  137.          Height          =   375
  138.          Left            =   240
  139.          TabIndex        =   6
  140.          Top             =   2760
  141.          Width           =   975
  142.       End
  143.       Begin VB.CheckBox chkRose 
  144.          Caption         =   "Rose"
  145.          Height          =   375
  146.          Left            =   240
  147.          TabIndex        =   5
  148.          Top             =   2280
  149.          Width           =   975
  150.       End
  151.       Begin VB.CheckBox chkOwl 
  152.          Caption         =   "Owl"
  153.          Height          =   375
  154.          Left            =   240
  155.          TabIndex        =   4
  156.          Top             =   1800
  157.          Width           =   975
  158.       End
  159.       Begin VB.CheckBox chkClown 
  160.          Caption         =   "Clown"
  161.          Height          =   375
  162.          Left            =   240
  163.          TabIndex        =   3
  164.          Top             =   1320
  165.          Width           =   975
  166.       End
  167.       Begin VB.CheckBox chkCastle 
  168.          Caption         =   "Castle"
  169.          Height          =   375
  170.          Left            =   240
  171.          TabIndex        =   2
  172.          Top             =   840
  173.          Width           =   975
  174.       End
  175.       Begin VB.CheckBox chkCar 
  176.          Caption         =   "Car"
  177.          Height          =   375
  178.          Left            =   240
  179.          TabIndex        =   1
  180.          Top             =   360
  181.          Width           =   975
  182.       End
  183.    End
  184.    Begin VB.Frame framMessage 
  185.       Caption         =   "Type Your Message Here:"
  186.       Height          =   1335
  187.       Left            =   3000
  188.       TabIndex        =   12
  189.       Top             =   3840
  190.       Width           =   3495
  191.    End
  192.    Begin VB.Image imgTree 
  193.       BorderStyle     =   1  'Fixed Single
  194.       Height          =   735
  195.       Left            =   3000
  196.       Picture         =   "example.frx":0002
  197.       Stretch         =   -1  'True
  198.       Top             =   2520
  199.       Visible         =   0   'False
  200.       Width           =   735
  201.    End
  202.    Begin VB.Image imgRose 
  203.       BorderStyle     =   1  'Fixed Single
  204.       Height          =   735
  205.       Left            =   2040
  206.       Picture         =   "example.frx":0801
  207.       Stretch         =   -1  'True
  208.       Top             =   2520
  209.       Visible         =   0   'False
  210.       Width           =   735
  211.    End
  212.    Begin VB.Image imgOwl 
  213.       BorderStyle     =   1  'Fixed Single
  214.       Height          =   735
  215.       Left            =   3000
  216.       Picture         =   "example.frx":0FC2
  217.       Stretch         =   -1  'True
  218.       Top             =   1440
  219.       Visible         =   0   'False
  220.       Width           =   735
  221.    End
  222.    Begin VB.Image imgClown 
  223.       BorderStyle     =   1  'Fixed Single
  224.       Height          =   735
  225.       Left            =   2040
  226.       Picture         =   "example.frx":16B5
  227.       Stretch         =   -1  'True
  228.       Top             =   1440
  229.       Visible         =   0   'False
  230.       Width           =   735
  231.    End
  232.    Begin VB.Image imgCar 
  233.       BorderStyle     =   1  'Fixed Single
  234.       Height          =   735
  235.       Left            =   2040
  236.       Picture         =   "example.frx":1FBA
  237.       Stretch         =   -1  'True
  238.       Top             =   360
  239.       Visible         =   0   'False
  240.       Width           =   735
  241.    End
  242.    Begin VB.Image imgCastle 
  243.       BorderStyle     =   1  'Fixed Single
  244.       Height          =   735
  245.       Left            =   3000
  246.       Picture         =   "example.frx":28A6
  247.       Stretch         =   -1  'True
  248.       Top             =   360
  249.       Visible         =   0   'False
  250.       Width           =   735
  251.    End
  252.    Begin VB.Image imgDisplay 
  253.       Height          =   1335
  254.       Left            =   4080
  255.       Top             =   1920
  256.       Width           =   615
  257.    End
  258.    Begin VB.Image imgLights 
  259.       Height          =   1350
  260.       Index           =   3
  261.       Left            =   6720
  262.       Picture         =   "example.frx":2F0D
  263.       Top             =   4440
  264.       Visible         =   0   'False
  265.       Width           =   750
  266.    End
  267.    Begin VB.Image imgLights 
  268.       Height          =   1350
  269.       Index           =   2
  270.       Left            =   6720
  271.       Picture         =   "example.frx":3967
  272.       Top             =   3000
  273.       Visible         =   0   'False
  274.       Width           =   750
  275.    End
  276.    Begin VB.Image imgLights 
  277.       Height          =   1350
  278.       Index           =   1
  279.       Left            =   6720
  280.       Picture         =   "example.frx":43C1
  281.       Top             =   1560
  282.       Visible         =   0   'False
  283.       Width           =   750
  284.    End
  285.    Begin VB.Image imgLights 
  286.       Height          =   1350
  287.       Index           =   0
  288.       Left            =   6720
  289.       Picture         =   "example.frx":4E1B
  290.       Top             =   120
  291.       Visible         =   0   'False
  292.       Width           =   750
  293.    End
  294. Attribute VB_Name = "frmExample"
  295. Attribute VB_Creatable = False
  296. Attribute VB_Exposed = False
  297. Option Explicit
  298. Dim Counter As Integer
  299. Dim StopGo As Integer
  300. Private Sub chkCar_Click()
  301. If imgCar.Visible = False Then
  302.   imgCar.Visible = True
  303.   imgCar.Visible = False
  304. End If
  305. End Sub
  306. Private Sub chkCastle_Click()
  307. If imgCastle.Visible = False Then
  308.   imgCastle.Visible = True
  309.   imgCastle.Visible = False
  310. End If
  311. End Sub
  312. Private Sub cmdBeep_Click()
  313. End Sub
  314. Private Sub chkClown_Click()
  315. If imgClown.Visible = False Then
  316.   imgClown.Visible = True
  317.   imgClown.Visible = False
  318. End If
  319. End Sub
  320. Private Sub chkOwl_Click()
  321. If imgOwl.Visible = False Then
  322.   imgOwl.Visible = True
  323.   imgOwl.Visible = False
  324. End If
  325. End Sub
  326. Private Sub chkRose_Click()
  327. If imgRose.Visible = False Then
  328.   imgRose.Visible = True
  329.   imgRose.Visible = False
  330. End If
  331. End Sub
  332. Private Sub chkTree_Click()
  333. If imgTree.Visible = False Then
  334.   imgTree.Visible = True
  335.   imgTree.Visible = False
  336. End If
  337. End Sub
  338. Private Sub cmdExit_Click()
  339. End Sub
  340. Private Sub cmdStart_Click()
  341. If StopGo = 0 Then
  342.   StopGo = 1
  343.   cmdStart.Caption = "Stop"
  344.   StopGo = 0
  345.   cmdStart.Caption = "Start"
  346. End If
  347. End Sub
  348. Private Sub Form_Load()
  349. Counter = 0
  350. StopGo = 0
  351. End Sub
  352. Private Sub hsbAge_Change()
  353. txtAge.Text = Val(hsbAge)
  354. End Sub
  355. Private Sub optBlack_Click()
  356. frmExample.BackColor = vbBlack
  357. End Sub
  358. Private Sub optBlue_Click()
  359. frmExample.BackColor = vbBlue
  360. End Sub
  361. Private Sub optGreen_Click()
  362. frmExample.BackColor = vbGreen
  363. End Sub
  364. Private Sub optRed_Click()
  365. frmExample.BackColor = vbRed
  366. End Sub
  367. Private Sub optYellow_Click()
  368. frmExample.BackColor = vbYellow
  369. End Sub
  370. Private Sub tmrLights_Timer()
  371. If StopGo = 1 Then
  372.   imgDisplay.Picture = imgLights(Counter).Picture
  373.   Counter = Counter + 1
  374.   If Counter = 4 Then
  375.     Counter = 0
  376.   End If
  377. End If
  378. End Sub
  379.