Solved

Do not Repaint !  :-)

Posted on 1999-01-25
7
275 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
  • 2
  • 2
  • 2
  • +1
7 Comments
 

Author Comment

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

Expert Comment

by:Madshi
Comment Utility
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
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 7

Expert Comment

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

Expert Comment

by:williams2
Comment Utility
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
Comment Utility
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 50 total points
Comment Utility
:-)

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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

772 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

11 Experts available now in Live!

Get 1:1 Help Now