关于使用DotNetFactory,使用Button,想请问如何调用事件?
本帖最后由 今天有雾 于 2014-11-25 15:06 编辑Set FormInstance = DotNetFactory.CreateInstance("System.Windows.Forms.Form", "System.Windows.Forms")
FormInstance.Text = "My Test Custom User Form"
FormInstance.Maximizebox = True
FormInstance.Minimizebox = False
FormInstance.Width = 500
FormInstance.Height =500
FormInstance.Location.X = 200
FormInstance.Location.Y = 400
Set ButtonInstance1 = DotNetFactory.CreateInstance("System.Windows.Forms.Button", "System.Windows.Forms")
PosInstance.X = 20
PosInstance.Y = 10
ButtonInstance1 .Location = PosInstance
FormInstance.Controls.Add ButtonInstance1
'想在这里添加Button.Click的事件,请问应该如何写
FormInstance.ShowDialog
页:
[1]