Link to home
Start Free TrialLog in
Avatar of superboy
superboy

asked on

is there a function for this?

is there a function to refresh the screen in delphi?
if so..pls guide me..thanx
ASKER CERTIFIED SOLUTION
Avatar of ZifNab
ZifNab

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of superboy
superboy

ASKER

i mean refresh the coolbar or form..
the refresh does not work...
is there a win api function to do it?
or a procedure ?
Well, maybe you can first refresh all the components on the form, before you refresh the form itself.

from delphi help :

Example

The following code refreshes all windowed controls of Form1, then refreshes Form1.

var
  I: Integer;
begin
  for I := 0 to Form1.ComponentCount-1 do
    if Form1.Components[i] is TWinControl then
      with Form1.Components[i] as TWinControl do
        Refresh;
  Form1.Refresh;
end;

A WinAPI function is redrawwindow for a certain rectangle or the UpdateWindow(handle) for the whole window.
But this function is already called by refresh.

regards, Zif.
If the "Refresh" method dosen´t work correctly,
uses the "Update" method.