Articles   Members Online: 3
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to revert to Win 3.1 form resizing behaviour Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
10-Oct-02
Category
VCL-Forms
Language
Delphi 2.x
Views
32
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Jonas Bilinkevicius

Has anyone found a way to prevent the Paint method from firing when you're in the 
middle of resizing a form? In other words, is there some way to ghost the change 
until the user actually releases the mouse button, instead of redrawing the form 
constantly during the resize?

Answer:

You can revert to the way a window was resized in Win 3.1 - with a sizing frame and 
a redraw only when the user let go of the mouse.

In your forms declaration you place this:

1   private
2   	{Private declarations}
3   	FDragFullWindowState: LongBool;
4   	procedure WMEnterSizeMove(var msg: TMessage); message WM_ENTERSIZEMOVE;
5   	procedure WMExitSizeMove(var msg: TMessage); message WM_EXITSIZEMOVE;
6   
7   The implementation is like this:
8   
9   procedure TProdBuilderMainForm.WMEnterSizeMove(var msg: TMessage);
10  begin
11    SystemParametersInfo(SPI_GETDRAGFULLWINDOWS, 0, @FDragFullWindowState, 0);
12    if FDragFullWindowState then
13      SystemParametersInfo(SPI_SETDRAGFULLWINDOWS, Ord(False), nil, 0);
14  end;
15  
16  procedure TProdBuilderMainForm.WMExitSizeMove(var msg: TMessage);
17  begin
18    if FDragFullWindowState then
19      SystemParametersInfo(SPI_SETDRAGFULLWINDOWS, Ord(True), nil, 0);
20  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC