Re: How to speed up looping through controls (used for restore and maximize)?

From: Michael Szuchy (szuchymj_at_jmu.edu)
Date: 04/09/04


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.



Relevant Pages

  • Sometimes cant save with Wizards Save button
    ... The reason I want something that will loop through the controls is because I ... Priority, etc and another that has TuningNumber, Customer, Status, Rev, etc. ...
    (microsoft.public.access.forms)
  • Re: Sometimes cant save with Wizards Save button
    ... There's absolutely no reason to loop thru controls, ... that has changed.You would only do this if you were runnng some kind of data ...
    (microsoft.public.access.forms)
  • Re: RunCommand acCmdRecordsGoToNext
    ... controls unlocked, for instance. ... Another thing that may come in handy if that doesn't is to loop through the ... increasing intRecordCount on each loop. ... Dim strPassword As String ...
    (microsoft.public.access.forms)
  • Re: RunCommand acCmdRecordsGoToNext
    ... controls unlocked, for instance. ... Another thing that may come in handy if that doesn't is to loop through the ... increasing intRecordCount on each loop. ... Dim strPassword As String ...
    (microsoft.public.access.forms)
  • Re: Slow VFP 8 Forms vs. 2.6 Screens
    ... use caution when calling DOEVENTS FORCE in a tight code loop, ... You might try setting a procedure file. ... All form controls are bound to memvars that are initialized ...
    (microsoft.public.fox.programmer.exchange)