Invalid window handle
I'm creating reports at runtime (create the components and load the report
from a template file) - that works BUT:
- when I call Print I first get an exception saying "Drawing not allowed on
canvas" (translated from German) and afterwards the report is shown
correctly on screen when the program is being run within the IDE and there
was a breakpoint on the Print command - when I start the program from
outside the IDE Windows XP says that the application has to be closed due to
an invalid command or so - it shows the following error-message: "Exception
EWin32Error in module MyProgram.exe at 0000E2A8. Win32-error. Code: 1400.
Invalid window handle." (translated from German).
I'm using Delphi 5 and currently still the demo of the Enterprise version of
RBuilder - my boss said that he'll order RBuilder this week but for now I've
to work with the demo and currently I'm completely stuck - please help me.
Maybe I should mention that the report is created, loaded and printed within
a Thread - maybe there are conflicts with the VCL and so on? I'll try to
Synchronize() the print-command in a minute - maybe that helps...
Helge.
from a template file) - that works BUT:
- when I call Print I first get an exception saying "Drawing not allowed on
canvas" (translated from German) and afterwards the report is shown
correctly on screen when the program is being run within the IDE and there
was a breakpoint on the Print command - when I start the program from
outside the IDE Windows XP says that the application has to be closed due to
an invalid command or so - it shows the following error-message: "Exception
EWin32Error in module MyProgram.exe at 0000E2A8. Win32-error. Code: 1400.
Invalid window handle." (translated from German).
I'm using Delphi 5 and currently still the demo of the Enterprise version of
RBuilder - my boss said that he'll order RBuilder this week but for now I've
to work with the demo and currently I'm completely stuck - please help me.
Maybe I should mention that the report is created, loaded and printed within
a Thread - maybe there are conflicts with the VCL and so on? I'll try to
Synchronize() the print-command in a minute - maybe that helps...
Helge.
This discussion has been closed.
Comments
Report.PrinterSetup.PrinterName to Screen, or install a default printer.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com