?
Solved

Do not Repaint !  :-)

Posted on 1999-01-25
7
Medium Priority
?
283 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
Industry Leaders: 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

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…
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

765 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