一、選擇題:
1—3: DDA
二、填空題
6 2.AB A
三、編程題
1.Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x
As Single, Y As Single)
Text1 = x: Text2 = Y
End Sub
2.
Dim startX, StartY As Integer ‘在通用中申明
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As
Single, Y As Single)
If Button = 2 Then
startX = x: StartY = Y
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As
Single, Y As Single)
If Button = 1 Then
PSet (x, Y), RGB(0, 0, 0)
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, x As
Single, Y As Single)
If Button = 2 Then
Dim r%, c%
Dim EndX, EndY As Integer
EndX = x: EndY = Y
c = RGB(0, 0, 0)
r = Sqr((EndX - startX) ^ 2 + (EndY - StartY) ^ 2)
Form1.Circle (startX, StartY), r, c
End If
End Sub