RAD Studio VCL Reference
|
Restores forms designated as fsStayOnTop to be topmost again.
procedure RestoreTopMosts;
__fastcall RestoreTopMosts();
Use RestoreTopMosts to return forms that were originally designated as topmost forms (FormStyle is fsStayOnTop), then temporarily changed to be non-topmost forms with the NormalizeTopMosts or NormalizeAllTopMosts method, to a topmost position.
C++ Examples:
/* The following code causes "stay on top" forms to allow a MessageBox to appear on top. After the message box is closed, the topmost forms are restored so that they continue to float to the top. */ void __fastcall TForm1::Button1Click(TObject *Sender) { Application->NormalizeTopMosts(); #ifdef _DELPHI_STRING_UNICODE Application->MessageBox(L"This should be on top.", L"Look", MB_OKCANCEL); #else Application->MessageBox("This should be on top.", "Look", MB_OKCANCEL); #endif Application->RestoreTopMosts(); }
Delphi Examples:
{ The following code causes "stay on top" forms to allow a MessageBox to appear on top. After the message box is closed, the topmost forms are restored so that they continue to float to the top. } procedure TForm1.Button1Click(Sender: TObject); begin with Application do begin NormalizeTopMosts; MessageBox('This should be on top.', 'Look', MB_OK); // [smbOK] RestoreTopMosts; end; end;
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|