51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 2118|回复: 0
打印 上一主题 下一主题

[原创] 关于使用DotNetFactory,使用Button,想请问如何调用事件?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2014-11-25 15:05:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 今天有雾 于 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



分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-5-6 07:00 , Processed in 0.062041 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表