Dim a As Single
Dim b As Single
Dim x As Single
Dim y As Single
Private Sub Command1_Click()
x = 2000
y = 2660
Picture2.PaintPicture Picture1.Picture, 0, 0, , , , , , , vbSrcCopy(背景)
Picture2.PaintPicture p51a.Picture, x, y, , , , , , , vbSrcAnd(飛機的mask)
Picture2.PaintPicture p51.Picture, x, y, , , , , , , vbSrcInvert(飛機的彩色圖)
Picture2.PaintPicture p51a.Picture, x, y, , , , , , , vbSrcAnd
Picture2.PaintPicture p51.Picture, x, y, , , , , , , vbSrcInvert
End Sub
Private Sub KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyLeft Then x = x - 100 * a
If KeyCode = vbKeyRight Then x = x + 100 * a
If KeyCode = vbKeyUp Then y = y - 100 * b
If KeyCode = vbKeyDown Then y = y + 100 * b
End Sub
Dim b As Single
Dim x As Single
Dim y As Single
Private Sub Command1_Click()
x = 2000
y = 2660
Picture2.PaintPicture Picture1.Picture, 0, 0, , , , , , , vbSrcCopy(背景)
Picture2.PaintPicture p51a.Picture, x, y, , , , , , , vbSrcAnd(飛機的mask)
Picture2.PaintPicture p51.Picture, x, y, , , , , , , vbSrcInvert(飛機的彩色圖)
Picture2.PaintPicture p51a.Picture, x, y, , , , , , , vbSrcAnd
Picture2.PaintPicture p51.Picture, x, y, , , , , , , vbSrcInvert
End Sub
Private Sub KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyLeft Then x = x - 100 * a
If KeyCode = vbKeyRight Then x = x + 100 * a
If KeyCode = vbKeyUp Then y = y - 100 * b
If KeyCode = vbKeyDown Then y = y + 100 * b
End Sub
文章標籤
全站熱搜
