XP-Crash during call of .ExecWB

Hi everybody,

i have the problem that my WinXP crashs(no bluscreen etc. its like pulling the plug) if i call
Call BrowserToPrint.Navigate(str_Time_HTML) 'this part works
BrowserToPrint.ExecWB(OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DODEFAULT)
in my VisualBasic 5.0 program.

Sometimes XP crashs during loading of the preview window, sometimes after pressing the print button.

I also tried the other options:
Call BrowserToPrint.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER)
Call BrowserToPrint.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER)

but it doesn't work. Has somebody an idea why XP can crash during this operation?









marcomaniaAsked:
Who is Participating?
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Then there is most likely something wrong with the old project.   Tis a pain in the butt.... but, I think you may be ok if you start with a new project and then add your components and copy your code over to the new project.

Good Luck....let us know how it goes.
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
What is in BrowserToPrint?  I Googled it and found absolutely nothing so it must be a sub or function in one of your modules.
0
 
EDDYKTCommented:
BrowserToPrint s the webbrowser object name
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Sorry, stupid comment by me.  Looks like BrowserToPrint is the name of your WebBrowser Control. Duh....
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Try creating a new Project with just a WebBrowser control and a CommandButton.

Paste the following code and hit the button.  Does it crash?

' -----------Begin Code
Private Sub Command1_Click()
    WebBrowser1.ExecWB OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DODEFAULT
End Sub

Private Sub Form_Load()
    WebBrowser1.Navigate "http://www.google.com"
End Sub
0
 
marcomaniaAuthor Commented:
Hi,

i tried the simple version, it works perfect (without a crash) :-(

0
 
marcomaniaAuthor Commented:
After testing and testing and testing,
i found out that it must be a problem with my settings

because I tried to print directly with internet explorer ==> crash
i tried it from other computers everything works.

so I make a basic installation with my pc and then we will see

thx for your help

0
 
marcomaniaAuthor Commented:
problem is solved,

we found out, that the reason for the xp-crash was a old printer-driver
after installing the new one, everything works perfect.
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Thanx for the update!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.