Dim mypen As Pen
mypen = New Pen(System.Drawing.Color.Red)
Dim mydraw As System.Drawing.Graphics
mydraw = PictureBox1.CreateGraphics()
'画孤
Dim i As Integer
Dim k As Integer
For i = 300 To 0 Step -5
If i = 0 Then
MsgBox("hello")
Exit For
End If
k = 1
mydraw.DrawArc(mypen, CSng(105 - 1.414 * i), CSng(105 - 1.414 *
i), i, i, 0, 360)
Do While (k < 90000000)
k = k + 1
Loop
Next
发现等了一会儿就画出来了
7 个解决方案
#1
Microsoft Visual FoxPro Language Reference
DOEVENTS CommandSee Also
AutoYield Property | Events
Executes all pending Windows events.
DOEVENTS
Remarks
Window events are placed in a queue when the AutoYield property is set to false (.F.) and program code is executing. DOEVENTS executes all pending Windows events and processes any user code associated with the Windows events.
See Also
AutoYield Property | Events
有呀
DOEVENTS CommandSee Also
AutoYield Property | Events
Executes all pending Windows events.
DOEVENTS
Remarks
Window events are placed in a queue when the AutoYield property is set to false (.F.) and program code is executing. DOEVENTS executes all pending Windows events and processes any user code associated with the Windows events.
See Also
AutoYield Property | Events
有呀
#2
Visual FoxPro ?????我是说VB.NET
#3
怎么没有?
ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfSystemWindowsFormsApplicationClassDoEventsTopic.htm
ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfSystemWindowsFormsApplicationClassDoEventsTopic.htm
#4
Doevents方法放在了Application类中:
Application.Doevents
Application.Doevents
#5
可以改变,但你必须写实现模块时间里的方法名,如:
实现模块事件
Module module1
public Event Onevent(byval name as string)
sub DoEvent()‘这就是DoEvent,可以换成别的名称
RaiseEvent Onevent("Module1")
end sub
End Module
-------------------------------------------------
实现模块事件处理事件
public Class Form1
inherits system.windows.forms.form
[......]
private sub OnEvent(byval Name as string)
Msgbox(Name)
End Sub
private sub button1_click(byval sender as system.object, _
byval e as system.EventArgs) Handles Button1.click
AddHandle Module1.OnEvent,Addressof OnEvent
Module1.DoEvent()
End Sub
[.......]
End Class
实现模块事件
Module module1
public Event Onevent(byval name as string)
sub DoEvent()‘这就是DoEvent,可以换成别的名称
RaiseEvent Onevent("Module1")
end sub
End Module
-------------------------------------------------
实现模块事件处理事件
public Class Form1
inherits system.windows.forms.form
[......]
private sub OnEvent(byval Name as string)
Msgbox(Name)
End Sub
private sub button1_click(byval sender as system.object, _
byval e as system.EventArgs) Handles Button1.click
AddHandle Module1.OnEvent,Addressof OnEvent
Module1.DoEvent()
End Sub
[.......]
End Class
#6
郁闷,楼上的不要乱说啊!
VB6 VB.NET
DoEvents Application.DoEvents()
VB6 VB.NET
DoEvents Application.DoEvents()
#7
Application.DoEvents()
#1
Microsoft Visual FoxPro Language Reference
DOEVENTS CommandSee Also
AutoYield Property | Events
Executes all pending Windows events.
DOEVENTS
Remarks
Window events are placed in a queue when the AutoYield property is set to false (.F.) and program code is executing. DOEVENTS executes all pending Windows events and processes any user code associated with the Windows events.
See Also
AutoYield Property | Events
有呀
DOEVENTS CommandSee Also
AutoYield Property | Events
Executes all pending Windows events.
DOEVENTS
Remarks
Window events are placed in a queue when the AutoYield property is set to false (.F.) and program code is executing. DOEVENTS executes all pending Windows events and processes any user code associated with the Windows events.
See Also
AutoYield Property | Events
有呀
#2
Visual FoxPro ?????我是说VB.NET
#3
怎么没有?
ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfSystemWindowsFormsApplicationClassDoEventsTopic.htm
ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfSystemWindowsFormsApplicationClassDoEventsTopic.htm
#4
Doevents方法放在了Application类中:
Application.Doevents
Application.Doevents
#5
可以改变,但你必须写实现模块时间里的方法名,如:
实现模块事件
Module module1
public Event Onevent(byval name as string)
sub DoEvent()‘这就是DoEvent,可以换成别的名称
RaiseEvent Onevent("Module1")
end sub
End Module
-------------------------------------------------
实现模块事件处理事件
public Class Form1
inherits system.windows.forms.form
[......]
private sub OnEvent(byval Name as string)
Msgbox(Name)
End Sub
private sub button1_click(byval sender as system.object, _
byval e as system.EventArgs) Handles Button1.click
AddHandle Module1.OnEvent,Addressof OnEvent
Module1.DoEvent()
End Sub
[.......]
End Class
实现模块事件
Module module1
public Event Onevent(byval name as string)
sub DoEvent()‘这就是DoEvent,可以换成别的名称
RaiseEvent Onevent("Module1")
end sub
End Module
-------------------------------------------------
实现模块事件处理事件
public Class Form1
inherits system.windows.forms.form
[......]
private sub OnEvent(byval Name as string)
Msgbox(Name)
End Sub
private sub button1_click(byval sender as system.object, _
byval e as system.EventArgs) Handles Button1.click
AddHandle Module1.OnEvent,Addressof OnEvent
Module1.DoEvent()
End Sub
[.......]
End Class
#6
郁闷,楼上的不要乱说啊!
VB6 VB.NET
DoEvents Application.DoEvents()
VB6 VB.NET
DoEvents Application.DoEvents()
#7
Application.DoEvents()