几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » SolidWorks二次开发
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-04-12, 10:47 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】vb.net modeless dialogs in solidworks

vb.net modeless dialogs in solidworks
hi,
problem number 1. vb.net modeless dialogs in solidworks
we are using the application.run method (as advised in sw api documentation) to display a modless form. we use the setparent api 'user32" to set the parent window for the form we want display as modeless.
here is the callback function.
public sub onsamplecallback()
dim oobj as new myapp.form1()
setparent(oobj.handle.toint32, iswapp.frame.gethwnd)
windows.forms.application.run(oobj)
end sub
attached a zip file containing the source code of myapp. not much code just a form with two buttons. compile the project ,create a sample addin, add reference of myapp and add the callback function to a button.
then load the add in and run the command.
the dialog appears in solid solidworks,
shift the focus from the form to the solidworks window
present 'enter" key.
everything hangs.
problem number 2.
to avoid this issue we stared using the 'form.show' method , in this case the 'tab and the enter key' will not work on the modeless forms.
then in some commands we show a modeless form prompting the user to select a cavity and the control moves in a
do loop waiting for the user to select a cavity. in this case also if the user press the enter key then everything hangs.
regards ,
prasenjit
hello,
i've a similar problem. i have implemented a dll in vb.net which starts a form. i use the application.run(form) method, so that i capture the tab and enter key. but if the user now switch from my form to solidworks-session (alt-tab), he can't do anything (in example. open a part, edit a part or anything else).
if i start my form with the form.show method, than it's works, but i can't capture the tab and enter key.
in visual basic 6 it works as expected. also in vb.net with solidworks 2007. but in sw 2008 i get the described problem.
is this behaviour: "works as designed" or is there a chance to support both: capture tab and enter key and let the user work in solidworks, if he switches from my form to sw?
thanks for any help!
regards, juergen
hello,
is there no chance to get help for this problem?
any help is welcome.
thanks and regards,
juergen
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】solidworks macros capabilities yang686526 SolidWorks二次开发 0 2009-04-12 10:29 PM
【转帖】solidworks macros capabilities yang686526 SolidWorks二次开发 0 2009-04-12 07:40 PM


所有的时间均为北京时间。 现在的时间是 09:06 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多