Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Do not Repaint !  :-)

Posted on 1999-01-25
7
Medium Priority
?
285 Views
Last Modified: 2010-04-04
D4, W98, Paradox
Hello all,
  How could i tell Windows do not repaint a componant until I want ?
  I am creating a TCalendar component
  My component's ancestor is TPanel and had 350 TButons on it. Buttons size and height are proportionals to TCalendar's ones one. But when 1 change size and height of the TCalendar, the butons are painted once fot changing Height and once again when changing width.
  so question is : How could i tell Windows do not repaint a componant until I want ?

Regards, ans thanks a lot for help.
 
     HelpMe
0
Comment
Question by:helpme020897
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 

Author Comment

by:helpme020897
ID: 1363277
read " But when I change" instead of  "But when 1 change".
   Thx.
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1363278
Why not using TCalendar.SetBounds(left,top,newWidth,newHeight) instead of changing width and height seperately?

Regards, Madshi.
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1363279
Or you can use
  SendMessage(calendar1.handle, WM_SETREDRAW, 0, 0);
to prevent redrawing and
  SendMessage(calendar1.handle, WM_SETREDRAW, 1, 0);
to allow it again.

Does this help?

Regards, Madshi.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Expert Comment

by:BlackMan
ID: 1363280
You can freeze the entire window by using LockWindowUpdate(MyForm.Handle).
Use LockWindowUpdate(0) to release
0
 
LVL 3

Expert Comment

by:williams2
ID: 1363281
If I were you I would rather override the components OnPaint procedure instead for handling more customdefined ownerdraw methods.

Regards,
Williams
0
 

Author Comment

by:helpme020897
ID: 1363282
Thanks to each of you.

 But i used BlackMan's solution and it works fine :-)
Please BlackMan lock this question and let me give your benefits. :-)

  HelpMe
0
 
LVL 7

Accepted Solution

by:
BlackMan earned 200 total points
ID: 1363283
:-)

You can freeze the entire window by using LockWindowUpdate(MyForm.Handle).
Use LockWindowUpdate(0) to release
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

609 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