home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD76727112000.psc / frmMain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-07-10  |  1.4 KB  |  49 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMain 
  3.    BorderStyle     =   0  'None
  4.    Caption         =   "First Game Thing"
  5.    ClientHeight    =   3195
  6.    ClientLeft      =   0
  7.    ClientTop       =   0
  8.    ClientWidth     =   4680
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   213
  11.    ScaleMode       =   3  'Pixel
  12.    ScaleWidth      =   312
  13.    ShowInTaskbar   =   0   'False
  14.    StartUpPosition =   3  'Windows Default
  15. Attribute VB_Name = "frmMain"
  16. Attribute VB_GlobalNameSpace = False
  17. Attribute VB_Creatable = False
  18. Attribute VB_PredeclaredId = True
  19. Attribute VB_Exposed = False
  20. Option Explicit
  21. Private Sub Form_Click()
  22.     'this ends the app if the user clicks the form
  23.     DX_EndIt
  24. End Sub
  25. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  26.     'these are the keys used for moving the sprite.
  27.     Select Case KeyCode
  28.     Case vbKeyUp
  29.         'This moves the sprites Y-Coordinate up
  30.         sY = sY - 10
  31.     Case vbKeyDown
  32.         'This moves the sprites Y-Coordinate down
  33.         sY = sY + 10
  34.     Case vbKeyLeft
  35.         'This moves the sprites X-Coordinate left
  36.         sX = sX - 10
  37.     Case vbKeyRight
  38.         'This moves the sprites X-Coordinate right
  39.         sX = sX + 10
  40.     'if the user presses Escape it will end the program
  41.     Case vbKeyEscape
  42.         DX_EndIt
  43.     End Select
  44. End Sub
  45. Private Sub Form_Load()
  46.     'this goes to the main initialization sub
  47.     DX_Init
  48. End Sub
  49.