English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

原程式碼...不知哪裡出錯>\"< 畫不出小精靈
Private Sub Command1_Click()
Call drwpie(0, -1 / 4, -7 / 4)
Call drwpie(1, -1 / 6, -11 / 6)
Call drwpie(2, -2, -2)
SavePicture Picture1(0).Image, App.Path & \"\\\" & \"test0.bmp\"
SavePicture Picture1(1).Image, App.Path & \"\\\" & \"test1.bmp\"
SavePicture Picture1(2).Image, App.Path & \"\\\" & \"test2.bmp\"
End Sub

Sub drwpie(pno As Integer, st, ed As Single)

Const pi = 3.1415926
cx = Picture1(pno).ScaleWidth / 2
cy = Picture1(pno).ScaleHeight / 2
radius = 3 / 4 * cx
Picture1(pno).Circle (cx + 15, cy - 20), 2, RGB(0, 0, 0)
Picture1(pno).Circle (cx, cy), radius, RGB(0, 0, 0), st * pi, ed * pi

End Sub

Private Sub Command2_Click()
Timer1.Enabled = Not Timer1.Enabled
End Sub



Private Sub timer1_timer()
Static pno As Integer
Static sw As Boolean
If sw = False Then
pno = pno + 1
If pno = 2 Then sw = False
End If
Image1.Picture = LoadPicture(App.Path & \"\\\" & \"TEST\" & pno & \".bmp\")
End Sub

2006-05-03 17:25:06 · 1 個解答 · 發問者 2 in 電腦與網際網路 軟體

1 個解答

Private Sub Command1_Click()Call drwpie(0, -1 / 4, -7 / 4)Call drwpie(1, -1 / 6, -11 / 6)Call drwpie(2, -2, -2)SavePicture Picture1(0).Image, App.Path & "\" & "test0.bmp"SavePicture Picture1(1).Image, App.Path & "\" & "test1.bmp"SavePicture Picture1(2).Image, App.Path & "\" & "test2.bmp"End SubSub drwpie(pno As Integer, st, ed As Single)Const pi = 3.1415926cx = Picture1(pno).ScaleWidth / 2cy = Picture1(pno).ScaleHeight / 2radius = 3 / 4 * cxPicture1(pno).FillStyle = 0Picture1(pno).AutoRedraw = TruePicture1(pno).Circle (cx + 15, cy - 20), 2, RGB(0, 0, 0)Picture1(pno).Circle (cx, cy), radius, RGB(0, 0, 0), st * pi, ed * piPicture1(pno).AutoRedraw = FalseEnd SubPrivate Sub Command2_Click()Timer1.Enabled = Not Timer1.EnabledEnd SubPrivate Sub Timer1_timer()Static pno As IntegerImage1.Picture = LoadPicture(App.Path & "\" & "TEST" & pno & ".bmp")If pno < 2 Then   pno = pno + 1Else   pno = 0End IfEnd Sub

2006-05-04 11:51:09 · answer #1 · answered by W.J.S. 7 · 0 0

fedest.com, questions and answers