注册 登录
编程论坛 VC.NET论坛

点击父窗体form1工具栏“运行”按钮,使子窗体form2中的timer1运行: form2.Timer1.Enabled =true 为什么不行?

清茶001 发布于 2013-05-16 09:54, 5909 次点击
'Dim NewMDIChild As 绘图
Private Sub Main_Load(sender As Object, e As EventArgs) Handles MyBase.Load
       Dim NewMDIChild As New 绘图
        NewMDIChild.MdiParent = Me
        NewMDIChild.Show()
  End Sub
Private Sub 运行TButton1_Click(sender As Object, e As EventArgs) Handles 运行TButton1.Click
        NewMDIChild.Timer1.Enabled = True
  End Sub
不行?
1 回复
#2
wds12016-03-10 23:03
启动定时器用这个
 form2.Timer1.Interval=100  表示100毫秒启动一次
1