More Webgadget Printing Trouble
Posted: Wed Jul 21, 2004 4:53 pm
Really, really odd behavior here. I am trying to load and print a web page in a webgadget. It works fine if I load the page and have another button to trigger the print. When I load the URL with setgadgettext() and immediately try to issue the print command I get absolutely nothing.
WebObject\get_Busy() returns non-zero the very first time it's called but 1 every time after. WebObject\get_Readystate() ALWAYS returns 1, so it's totally useless too. I've tried delay()'ing - even a really long time, but it seems as if the web gadget is waiting for something, loading, or in some kind of disabled state.
Any other ideas?
Thanks!!
Code: Select all
WebObject.IWebBrowser2 = GetWindowLong_(GadgetID(webgadget), #GWL_USERDATA)
Repeat
WebObject\get_Busy(@IsBusy.l)
Delay(1)
Until IsBusy = 0
If prompt = 0
WebObject\ExecWB(#OLECMDID_PRINT, #OLECMDEXECOPT_DONTPROMPTUSER, 0, 0)
Else
WebObject\ExecWB(#OLECMDID_PRINTPREVIEW, #OLECMDEXECOPT_DONTPROMPTUSER, 0, 0)
EndIf
Any other ideas?
Thanks!!