|
本帖最后由 今天有雾 于 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
|
|