Solved

Delphi form movement after printing

Posted on 1998-11-15
5
128 Views
Last Modified: 2010-04-04
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?
0
Comment
Question by:DeCordova
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:dwwang
Comment Utility
Are you sure there is no statements causing the form to move?
0
 

Author Comment

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

0
 
LVL 4

Expert Comment

by:dwwang
Comment Utility
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?
0
 

Author Comment

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

0
 
LVL 4

Accepted Solution

by:
dwwang earned 100 total points
Comment Utility
So would you mind I have the answer? :)
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video discusses moving either the default database or any database to a new volume.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

19 Experts available now in Live!

Get 1:1 Help Now