Solved

XP-Crash during call of .ExecWB

Posted on 2003-10-24
9
414 Views
Last Modified: 2010-05-18
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?









0
Comment
Question by:marcomania
  • 5
  • 3
9 Comments
 
LVL 85

Expert Comment

by:Mike Tomlinson
Comment Utility
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
 
LVL 26

Expert Comment

by:EDDYKT
Comment Utility
BrowserToPrint s the webbrowser object name
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
Comment Utility
Sorry, stupid comment by me.  Looks like BrowserToPrint is the name of your WebBrowser Control. Duh....
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:marcomania
Comment Utility
Hi,

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

0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 125 total points
Comment Utility
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
 

Author Comment

by:marcomania
Comment Utility
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
 

Author Comment

by:marcomania
Comment Utility
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
 
LVL 85

Expert Comment

by:Mike Tomlinson
Comment Utility
Thanx for the update!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now