Link to home
Start Free TrialLog in
Avatar of DeCordova
DeCordova

asked on

Delphi form movement after printing

I have a Delphi form that selects an operation and then prints a report. It works fine except that when it finishes printing, the whole form moves to the bottom of the screen with only about half of it showing. The form is set to be centered on the screen and that is what it does until after the printing is completed. I am using graphics on the report, but I am doing the same thing on other forms that work perfectly. Any idea what is happening and what to do to prevent it?
Avatar of dwwang
dwwang

Are you sure there is no statements causing the form to move?
Avatar of DeCordova

ASKER

If there are, I sure can't find them. What kinds of statements would cause the form to move? This happens to forms where I have some extensive graphics plotting lines, etc. no bitmaps. Could this have anything to do with it? I'm using Delphi 3 Standard Edition, by the way.

Could there be any statements that you used to control the printer or something like that, but forgot to use WITH ... do statements, so they actually affect the form?
Although you didn't have an answer for my problem, you got me to thinking in a different way. Here's what I found: I was using a variable "Top" to define the top of graphics lines on the page and I didn't declare it. Somehow Delphi let me get away with that because there must be a declaration somewhere in Delphi. When I used a different name for the variable and declared it that solved the problem. Thanks for your help.

ASKER CERTIFIED SOLUTION
Avatar of dwwang
dwwang

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial