Re: How to speed up looping through controls (used for restore and maximize)?
From: Michael Szuchy (szuchymj_at_jmu.edu)
Date: 04/09/04
- Next message: Maarten Wiltink: "Re: How to speed up looping through controls (used for restore and maximize)?"
- Previous message: Dr John Stockton: "Re: comp.lang.pascal.delphi.misc miniFAQ (full version)"
- In reply to: Michael Szuchy: "How to speed up looping through controls (used for restore and maximize)?"
- Next in thread: Maarten Wiltink: "Re: How to speed up looping through controls (used for restore and maximize)?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 8 Apr 2004 22:11:53 -0700
I think I figured it out myself. Previously I'd had the 'inherited;'
line before the loop (the reason being that it looked weird to change
the constraints on the form after maximizing). So what happened was
the window maximized/restored, and then afterwards all the controls
moved. What I did is move the 'inherited;' line to the beginning of
procedure, insert the line 'LockWindowupdate(Form1.Handle);' before
changing the constraints, and 'LockWindowupdate(0);' after the loop.
So now the controls move, and then the form maximizes. I can't see why
it's going faster now, considering that all I did was reverse the
order of some code. Maybe I didn't test the performance accurately
enough in the first place? I don't know. Anyway, hopefully someone
will learn from my mistake.
- Next message: Maarten Wiltink: "Re: How to speed up looping through controls (used for restore and maximize)?"
- Previous message: Dr John Stockton: "Re: comp.lang.pascal.delphi.misc miniFAQ (full version)"
- In reply to: Michael Szuchy: "How to speed up looping through controls (used for restore and maximize)?"
- Next in thread: Maarten Wiltink: "Re: How to speed up looping through controls (used for restore and maximize)?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|