VERSION 5.00 Begin VB.Form acax BackColor = &H00FFFF80& Caption = "ActiveX airplanes!" ClientHeight = 2580 ClientLeft = 60 ClientTop = 345 ClientWidth = 6630 LinkTopic = "Form1" ScaleHeight = 2580 ScaleWidth = 6630 StartUpPosition = 3 'Windows Default Begin VB.CommandButton cmdLandB Caption = "land here" Height = 375 Left = 4680 TabIndex = 5 Top = 1080 Width = 855 End Begin VB.CommandButton cmdLandA Caption = "land here" Height = 375 Left = 480 TabIndex = 4 Top = 1440 Width = 1095 End Begin VB.CommandButton cmdTakeOff Caption = "take off" Height = 375 Left = 2400 TabIndex = 3 Top = 1800 Width = 615 End Begin VB.CommandButton cmdRight Caption = "right" Height = 375 Left = 3960 TabIndex = 2 Top = 1800 Width = 615 End Begin VB.CommandButton cmdLeft Caption = "left" Height = 375 Left = 3240 TabIndex = 1 Top = 1800 Width = 615 End Begin Project1.Airplane plane Height = 615 Left = 600 TabIndex = 0 Top = 480 Width = 615 _extentx = 1296 _extenty = 1296 End Begin VB.Timer Timer1 Interval = 500 Left = 1800 Top = 1800 End Begin VB.Image imgAirportB BorderStyle = 1 'Fixed Single Height = 750 Left = 4680 Picture = "acax.frx":0000 Top = 360 Width = 825 End Begin VB.Image imgAirportA BorderStyle = 1 'Fixed Single Height = 1140 Left = 480 Picture = "acax.frx":1C4A Top = 360 Width = 1125 End End Attribute VB_Name = "acax" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub cmdLandA_Click() plane.land imgAirportA End Sub Private Sub cmdLandB_Click() plane.land imgAirportB End Sub Private Sub cmdLeft_Click() plane.turnLeft End Sub Private Sub cmdRight_Click() plane.turnRight End Sub Private Sub cmdTakeOff_Click() plane.takeOff End Sub Private Sub Form_Load() 'set up a traditional cartesian coordinate system acax.Scale (-100, 100)-(100, -100) 'the plane control already 'knows' its top and 'left, so we need not explicitly set them End Sub Private Sub Timer1_Timer() plane.goForward 'the plane control cannot set its top and left, but 'it can tell us what they should be. We still must 'do the actual positioning from here. plane.Move plane.newLeft, plane.newTop End Sub