1.加入Refrence system.wnidows.forms
2.Code这样(比如我要加Timer)
VB
Imports System.Windows.Forms
Class Window1
Friend Withevents Timer1 As New Forms.Timer '禁止Timers.Timer / Threadnig.Timer
Private Sub Timer1_Tick() Handles Timer1.Tick
End Sub
End Class
C#
using System.Windows.Forms
class window1
{
friend withevents Forms.Timer Timer1 = new timer
private void timer1_tick()
{
}
}