• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 135
  • Last Modified:

is there a function for this?

is there a function to refresh the screen in delphi?
if so..pls guide me..thanx
0
superboy
Asked:
superboy
  • 2
  • 2
1 Solution
 
ZifNabCommented:
What do you mean with it?
Refresh your program are total screen?

Every component can be refreshe in delphi. Use refresh for this. e.g. Form1.Refresh;

Regards, Zif.
0
 
superboyAuthor Commented:
i mean refresh the coolbar or form..
0
 
superboyAuthor Commented:
the refresh does not work...
is there a win api function to do it?
or a procedure ?
0
 
ZifNabCommented:
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.
0
 
jpussacqCommented:
If the "Refresh" method dosenĀ“t work correctly,
uses the "Update" method.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now