Try this.  It disables any windows control.

procedure LockControl(Control: TWinControl; Lock: Boolean);
//RM Dangerous, enables /disables a visual components displaying ability
begin
    if (Control <> nil)
            and (Control.Handle <> 0) then begin

        if (Lock  = True) then begin
            SendMessage(Control.Handle, WM_SETREDRAW, 0, 0);
        end
        else begin
            SendMessage(Control.Handle, WM_SETREDRAW, 1, 0);
            RedrawWindow(Control.Handle,
                            nil,
                            0,
                            RDW_ERASE or RDW_FRAME or RDW_INVALIDATE or
RDW_ALLCHILDREN);
        end;
   end;
end;



Rob Martin
Software Engineer

phone 03 377 0495
fax 03 377 0496
web www.chreos.com
Wild Software Ltd
----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 14, 2004 11:45 AM
Subject: RE: [DUG] Screen flicker on updating control properties


> The only thing I can see in Delphi 5 is TWinControl.DisableAlign &
> .EnableAlign.
>
> I thought there might have been something like the BeginUpdate and
> EndUpdate methods on TTreeNode, but not that I can see. :-(
>
> Good luck,
>
> C.
>
> -----Original Message-----
> From: Mark Howard [mailto:[EMAIL PROTECTED]
>
> I am changing the number and text of items in a RadioGroup on a form and
> re-setting the RadioGroup's size, at run time.
> This is causing the screen to flicker.
> Can the flicker be stopped?
>
> _______________________________________________
> Delphi mailing list
> [EMAIL PROTECTED]
> http://ns3.123.co.nz/mailman/listinfo/delphi
>


_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to