Solved

Change color twice without see the change

Posted on 1998-06-30
4
135 Views
Last Modified: 2010-04-04
Hi

I have a form.panel1.color = clsilver.
i want to print the panel and i have to change the color of the panel in clwhite.

 Form.Panel1.color:=clwhite
 Form.print;
 Form.Panel1.color:=clsilver

But i dont want to the person to see the change of color on the screen.
Is there any method or command to not change the color on screen?

Thanks
0
Comment
Question by:sierra20
4 Comments
 
LVL 1

Expert Comment

by:michaue
ID: 1356721
I don't know how to do that exactly, but you can by doing a hide on the form, before the print event, (still having your change panel colour inbetween).

Then design a small form with borderstyle none, to display a message to the user, something like "PLEASE WAIT WHILE THE FORM IS PRINTING".

Change the colour of the panel back and close the second form after the print event and then show the first one ...
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1356722
Another way, maybe is this :

Capture the bitmap of the form, do your color manipulations on this one and print the bitmap.

Zif.
0
 
LVL 4

Accepted Solution

by:
BoRiS earned 50 total points
ID: 1356723
sierra20

Use the LockWindowUpdate API call to lock the updateing etc...

LockWindowUpdate(Form1.Handle);

Check the help file out for futher usage etc...

Later
BoRiS
0
 

Author Comment

by:sierra20
ID: 1356724
Thanks Boris, it was exactly what i was looking for.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Both in life and business – not all partnerships are created equal. Spend 30 short minutes with us to learn:   • Key questions to ask when considering a partnership to accelerate your business into the cloud • Pitfalls and mistakes other partners…
A simple description of email encryption using a secure portal service. This is one of the choices offered by The Email Laundry for email encryption. The other choices are pdf encryption which creates an encrypted pdf of your email and any attachmen…

911 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

18 Experts available now in Live!

Get 1:1 Help Now