几何尺寸与公差论坛

 找回密码
 注册
查看: 977|回复: 0

【转帖】displaying help files

[复制链接]
发表于 2009-4-13 10:26:39 | 显示全部楼层 |阅读模式
displaying help files
hi everyone,
i have added a menu entry on the help menu of solidworks.
with that entry i want to call a help file that i have created.
i use
windows.forms.help.showhelp("parent", helpfile) but i am not sure what i am meant to use as the parent control for my help file... is it meant to be the solidworks instance?
anyone has any ideas?
cheers,
--stav.
in this world i am nobody...
and nobody is perfect ;) !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
yes it is the hwnd handle to a control that owns the help file in case you want to make it modal or accept feedback or in case of crashes to trace back.
the second parameter is the help file nam, and if you add a third parameter it will be the internal name of the page you want to open the help file to initially.
hey luke,
i tried to get the hwnd handle of the frame but it didnt like it as it returns a long value and this function is expecting a control...
do you know how to resolve that?
cheers,
--stav.
in this world i am nobody...
and nobody is perfect ;) !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
you need to call swapp.frame().gethwnd()
this function call returns a long value...
swapp.frame().gethwnd()
when i try to use that as the first argument to the showhelp sub it throws a compile error saying that
value of type 'integer' cannot be converted to 'system.windows.forms.control'
in this world i am nobody...
and nobody is perfect ;) !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
answer oh your using a .net call obviously, sorry...
just try an explicit cast like this in c#:
windows.forms.help.showhelp((control)swhwnd, helpfile)
or vb.net like this:
windows.forms.help.showhelp(ctype(swhwnd, control), helpfile)
where swhwnd is the handle you got. if that fails just pass null in c# or nothing in vb.net
cheers luke!
worked fine with "nothing"
--stav.
in this world i am nobody...
and nobody is perfect ;) !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 22:43 , Processed in 0.189860 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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