2024年4月1日发(作者:)
'===================================================================
Dim hRC As Long '全局变量
Dim LEFT_MOUSE_DOWN As Boolean, RIGHT_MOUSE_DOWN As Boolean
Dim PICT_OLD_X As Integer, PICT_OLD_Y As Integer, PICT_OLD_Z As Integer
Dim rQuadX As GLfloat, rQuadY As GLfloat, rQuadZ As GLfloat
Dim mQuadX As GLfloat, mQuadY As GLfloat, mQuadZ As GLfloat
Dim RGB_R As Integer, RGB_G As Integer, RBG_B As Integer
Dim R_voul As Single
Private Sub RGB_TO(INDEX_COLOR As Long)
RGB_R = INDEX_COLOR And 255
RGB_G = ((INDEX_COLOR - RGB_R) / 256) And 255
RGB_B = ((INDEX_COLOR - RGB_R - RGB_G) / 256) / 256
End Sub
Private Sub backcolor_menu_Click()
Error = True '将 Cancel 设置成 True。
= cdlCCRGBInit '设置 Flags 属性。
lor '显示"颜色"对话框。
RGB_TO '将窗体的背景颜色设置成选定的'颜色。
Display
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As )
On Error Resume Next
Select Case
Case "按钮"
'应做:添加 '按钮' 按钮代码。
MsgBox "添加 '按钮' 按钮代码。"
End Select
End Sub
Private Sub exit_menu_Click()
Unload Form1
End Sub
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbRightButton Then
RIGHT_MOUSE_DOWN = True
PICT_OLD_X = x
PICT_OLD_Y = y
End If
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If RIGHT_MOUSE_DOWN Then
Dim XX As Single, YY As Single
XX = (x - PICT_OLD_X) / 10
YY = (y - PICT_OLD_Y) / 10
PICT_OLD_X = x
PICT_OLD_Y = y
rQuadX = rQuadX - YY
Display
rQuadY = rQuadY - XX
Display
End If
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbRightButton Then
RIGHT_MOUSE_DOWN = False
End If
End Sub
'====================================================================
Private Sub Form_Load()
Call EnableOpenGL() 'hdc从 Microsoft Windows)到对象的设备上下文句


发布评论