![]() |
【转帖】displaying help files
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 |
所有的时间均为北京时间。 现在的时间是 02:55 AM. |