Dim t As Date, t0 As Date, t1 As Date, t2 As Date, k As Integer
Private Sub Command1_Click()
Picture1.Cls
For i = 0 To 59
Picture1.Line ((90 * Cos(π / 2 + 6 * i * π / 180)), 90 * Sin(π / 2 + 6 * i * π / 180))-(95 * Cos(π / 2 + 6 * i * π / 180), 95 * Sin(π / 2 + 6 * i * π / 180)), vbBlue
Next i
Timer1.Interval = 1000
k = 0
Picture1.Line (0, 0)-(80 * Cos(π / 2 + 6 * k * π / 180), 80 * Sin(π / 2 + 6 * k * π / 180)), vbRed
t0 = Time
End Sub
Private Sub Command2_Click()
Timer1.Interval = 0
End Sub
Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.Scale (-100, 100)-(100, -100)
Picture1.PSet (0, 0)
For i = 0 To 59
Picture1.Line ((90 * Cos(π / 2 + 6 * i * π / 180)), 90 * Sin(π / 2 + 6 * i * π / 180))-(95 * Cos(π / 2 + 6 * i * π / 180), 95 * Sin(π / 2 + 6 * i * π / 180)), vbBlue
Next i
Picture1.Line (0, 0)-(80 * Cos(π / 2 + 6 * k * π / 180), 80 * Sin(π / 2 + 6 * k * π / 180)), vbRed
End Sub
Private Sub Timer1_Timer()
Picture1.Cls
Label1.Caption = CDate(Time - t0)
For i = 0 To 59
Picture1.Line ((90 * Cos(π / 2 + 6 * i * π / 180)), 90 * Sin(π / 2 + 6 * i * π / 180))-(95 * Cos(π / 2 + 6 * i * π / 180), 95 * Sin(π / 2 + 6 * i * π / 180)), vbBlue
Next i
k = k + 1
Picture1.Line (0, 0)-(80 * Cos(π / 2 - 6 * k * π / 180), 80 * Sin(π / 2 - 6 * k * π / 180)), vbRed
If k >= 59 Then k = 0
End Sub
一般情况下先用EXCEL做好一个样表文件,设定好打印区域和样式,需要填内容的时候,先程序复制一个样表文件,然后调用API打开表格填写内容并打印,如果想用API来实现调整模板和打印预览,可能比较困难,而且很抽象,个人觉得费时费力效果还不一定理想欢迎分享,转载请注明来源:内存溢出
评论列表(0条)