Лабораторная работа: Greating 3D-Graphics on visual basic

Y As Long 'using a win api function

End Type

Dim tmp () As POINTAPI

'This function is for drawing filled polygons Much faster than anything I wrote

Private Declare Function Polygon Lib "gdi32" _

(ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long

Private Sub BUTNOKAY_Click ()

'set the angle and draw the rotation

AngleHolder = AngleHolder + 5 'increment the angle

If AngleHolder = 360 Then 'reset the angle back to 0

AngleHolder = 0

End If

TEXTAngle. Text = AngleHolder 'display the current angle

Angle = AngleHolder 'Set the angle for calculations

Redraw 'refresh the display

End Sub

Private Sub BUTNQuit_Click ()

End 'end the program

End Sub

Private Sub BUTNReset_Click ()

AngleHolder = 355 'reset so displayed angle will be 0

BUTNOKAY_Click 'set angles and displays, then redraw

End Sub

Private Sub BUTNStart_Click ()

Timer1. Enabled = True 'start the autodraw timer

End Sub

Private Sub BUTNStop_Click ()

Timer1. Enabled = False 'stop the auto draw timer

End Sub

К-во Просмотров: 291
Бесплатно скачать Лабораторная работа: Greating 3D-Graphics on visual basic