home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / tutorial / autoclik / step3 / autodriv.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-03-27  |  6.8 KB  |  246 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "AutoClik Test Driver"
  4.    ClientHeight    =   2895
  5.    ClientLeft      =   1635
  6.    ClientTop       =   2190
  7.    ClientWidth     =   5100
  8.    BeginProperty Font 
  9.       name            =   "MS Sans Serif"
  10.       charset         =   1
  11.       weight          =   700
  12.       size            =   8.25
  13.       underline       =   0   'False
  14.       italic          =   0   'False
  15.       strikethrough   =   0   'False
  16.    EndProperty
  17.    ForeColor       =   &H80000008&
  18.    Height          =   3300
  19.    Left            =   1575
  20.    LinkTopic       =   "Form1"
  21.    ScaleHeight     =   2895
  22.    ScaleWidth      =   5100
  23.    Top             =   1845
  24.    Width           =   5220
  25.    Begin VB.CommandButton SetPosition 
  26.       Appearance      =   0  'Flat
  27.       BackColor       =   &H80000005&
  28.       Caption         =   "Set P&osition"
  29.       Height          =   375
  30.       Left            =   240
  31.       TabIndex        =   9
  32.       Top             =   1560
  33.       Width           =   1335
  34.    End
  35.    Begin VB.CommandButton GetPosition 
  36.       Appearance      =   0  'Flat
  37.       BackColor       =   &H80000005&
  38.       Caption         =   "Get &Position"
  39.       Height          =   375
  40.       Left            =   240
  41.       TabIndex        =   10
  42.       Top             =   2280
  43.       Width           =   1335
  44.    End
  45.    Begin VB.CommandButton AnimateXY 
  46.       Appearance      =   0  'Flat
  47.       BackColor       =   &H80000005&
  48.       Caption         =   "&Animate X && Y"
  49.       Height          =   375
  50.       Left            =   3360
  51.       TabIndex        =   14
  52.       Top             =   1800
  53.       Width           =   1575
  54.    End
  55.    Begin VB.CommandButton AnimatePosition 
  56.       Appearance      =   0  'Flat
  57.       BackColor       =   &H80000005&
  58.       Caption         =   "A&nimate Position"
  59.       Height          =   375
  60.       Left            =   3360
  61.       TabIndex        =   15
  62.       Top             =   2280
  63.       Width           =   1575
  64.    End
  65.    Begin VB.CommandButton RefreshDisplay 
  66.       Appearance      =   0  'Flat
  67.       BackColor       =   &H80000005&
  68.       Caption         =   "&Refresh Display"
  69.       Height          =   375
  70.       Left            =   3360
  71.       TabIndex        =   13
  72.       Top             =   1320
  73.       Width           =   1575
  74.    End
  75.    Begin VB.CommandButton SetAll 
  76.       Appearance      =   0  'Flat
  77.       BackColor       =   &H80000005&
  78.       Caption         =   "&Set All"
  79.       Height          =   375
  80.       Left            =   1680
  81.       TabIndex        =   11
  82.       Top             =   1560
  83.       Width           =   1335
  84.    End
  85.    Begin VB.CommandButton GetAll 
  86.       Appearance      =   0  'Flat
  87.       BackColor       =   &H80000005&
  88.       Caption         =   "&Get All"
  89.       Default         =   -1  'True
  90.       Height          =   375
  91.       Left            =   1680
  92.       TabIndex        =   12
  93.       Top             =   2280
  94.       Width           =   1335
  95.    End
  96.    Begin VB.CommandButton SetText 
  97.       Appearance      =   0  'Flat
  98.       BackColor       =   &H80000005&
  99.       Caption         =   "Set &Text"
  100.       Height          =   375
  101.       Left            =   1680
  102.       TabIndex        =   8
  103.       Top             =   1080
  104.       Width           =   1335
  105.    End
  106.    Begin VB.CommandButton SetY 
  107.       Appearance      =   0  'Flat
  108.       BackColor       =   &H80000005&
  109.       Caption         =   "Set &Y"
  110.       Height          =   375
  111.       Left            =   960
  112.       TabIndex        =   7
  113.       Top             =   1080
  114.       Width           =   615
  115.    End
  116.    Begin VB.CommandButton SetX 
  117.       Appearance      =   0  'Flat
  118.       BackColor       =   &H80000005&
  119.       Caption         =   "&Set &X"
  120.       Height          =   375
  121.       Left            =   240
  122.       TabIndex        =   6
  123.       Top             =   1080
  124.       Width           =   615
  125.    End
  126.    Begin VB.TextBox Text 
  127.       Appearance      =   0  'Flat
  128.       Height          =   375
  129.       Left            =   1680
  130.       TabIndex        =   5
  131.       Top             =   480
  132.       Width           =   1335
  133.    End
  134.    Begin VB.TextBox Y 
  135.       Appearance      =   0  'Flat
  136.       Height          =   375
  137.       Left            =   960
  138.       TabIndex        =   4
  139.       Top             =   480
  140.       Width           =   615
  141.    End
  142.    Begin VB.TextBox X 
  143.       Appearance      =   0  'Flat
  144.       Height          =   375
  145.       Left            =   240
  146.       TabIndex        =   3
  147.       Top             =   480
  148.       Width           =   615
  149.    End
  150.    Begin VB.CommandButton Close 
  151.       Appearance      =   0  'Flat
  152.       BackColor       =   &H80000005&
  153.       Caption         =   "&Close"
  154.       Height          =   375
  155.       Left            =   3360
  156.       TabIndex        =   16
  157.       Top             =   480
  158.       Width           =   1575
  159.    End
  160.    Begin VB.Label Label3 
  161.       Caption         =   "&Text"
  162.       Height          =   255
  163.       Left            =   1680
  164.       TabIndex        =   2
  165.       Top             =   240
  166.       Width           =   1335
  167.    End
  168.    Begin VB.Label Label2 
  169.       Caption         =   "&Y"
  170.       Height          =   255
  171.       Left            =   960
  172.       TabIndex        =   1
  173.       Top             =   240
  174.       Width           =   615
  175.    End
  176.    Begin VB.Label Label1 
  177.       Caption         =   "&X"
  178.       Height          =   255
  179.       Left            =   240
  180.       TabIndex        =   0
  181.       Top             =   240
  182.       Width           =   1215
  183.    End
  184. Attribute VB_Name = "Form1"
  185. Attribute VB_Creatable = False
  186. Attribute VB_Exposed = False
  187. Dim clik As Object
  188. Dim pos As Object
  189. Private Sub AnimatePosition_Click()
  190.     Set pos = clik.position
  191.     For i = 10 To 100 Step 5
  192.         pos.X = i
  193.         pos.Y = i
  194.         Set clik.position = pos
  195.         DoEvents
  196.     Next i
  197. End Sub
  198. Private Sub AnimateXY_Click()
  199.     For i = 10 To 100 Step 5
  200.         clik.X = i
  201.         clik.Y = i
  202.         DoEvents
  203.     Next i
  204. End Sub
  205. Private Sub Close_Click()
  206.     End
  207. End Sub
  208. Private Sub Form_Load()
  209.     Set clik = CreateObject("AutoClick.Document")
  210.     clik.ShowWindow
  211. End Sub
  212. Private Sub Form_Unload(Cancel As Integer)
  213.     Set clik = Nothing
  214. End Sub
  215. Private Sub GetAll_Click()
  216.     X.Text = clik.X
  217.     Y.Text = clik.Y
  218.     Text.Text = clik.Text
  219. End Sub
  220. Private Sub GetPosition_Click()
  221.     Set pos = clik.position
  222.     X.Text = pos.X
  223.     Y.Text = pos.Y
  224. End Sub
  225. Private Sub RefreshDisplay_Click()
  226.     clik.RefreshWindow
  227. End Sub
  228. Private Sub SetAll_Click()
  229.     clik.SetAllProps X.Text, Y.Text, Text.Text
  230. End Sub
  231. Private Sub SetPosition_Click()
  232.     Set pos = clik.position
  233.     pos.X = X.Text
  234.     pos.Y = Y.Text
  235.     Set clik.position = pos
  236. End Sub
  237. Private Sub SetText_Click()
  238.     clik.Text = Text.Text
  239. End Sub
  240. Private Sub SetX_Click()
  241.     clik.X = X.Text
  242. End Sub
  243. Private Sub SetY_Click()
  244.     clik.Y = Y.Text
  245. End Sub
  246.