Print preview Run-time error -2147417848 (80010108) - Urgent
Posted on 2004-08-24
I have designed a program in Visual Basic 6.
Incorporated in the program is a 3rd party print preview control called "Swiftprint".
In certain instances, upon clicking the print preview button, the following error is encountered:
Run-time error '-2147417848 (80010108)':
The object invoked has disconnected from its clients.
The error occurs infrequently and has occurred on both Win 98 and XP operating systems.
There is no apparent pattern which leads up to the error, i.e. from the user's point of view, it occurs randomly when attempting to activate a print preview.
In laymans terms, I suspect that the program loses connection with the control for some reason and cannot feed it commands.
I need to find the reason it loses connection or find a way of reestablishing the connection when it gets lost.
Unfortunately the author of the Swiftprint preview control has abandoned development on the control and his help file makes not reference to such an error.
In hindsight, I should have found an alternative print preview control, however I have designed a number of reports to generate via the SwiftPrint control and am reluctant to reproduce all that coding for another control.
I have read up on early vs. late binding sometimes being the cause of this form of problem, however, the control is an OCX that is dropped directly onto the form - it cannot be referenced to and manipulated as one would a reference to, say, Excel. Accordingly I cannot institute late binding to try and solve the problem. Maybe someone more advanced can offer further advice in trying to institute this solution?
Is there perhaps a way to refresh an OCX control to reestablish contact with it in some manner?
If no-one can offer any help in solving the problem with the current control - what practical recommendations are there for an alternate, time tested, stable, print preview control for Visual Basic 6?
This program is ready for commercial beta release barring this one error, which has been plaguing me for about 2 years now, any urgent assistance would be most appreciated.