MDI

Delphi

03/08/2003

Como faço para quando em uma aplicação MDI, já estiver aberta uma janela, se for chamada novamente a janela no menu, abra a janela aberta, não permitindo criar novamente outra janela para a mesma.


Nogueira

Nogueira

Curtidas 0

Respostas

Werlon Goulart

Werlon Goulart

03/08/2003

Tente ai...

Um Abraco
Werlon Goulart


procedure TfrmOrderEntryMain.mntmSuppliersClick(Sender: TObject);
var
OldCursor : TCursor;
i : integer;
begin
for i := 0 to MDIChildCount - 1 do
begin
if MDIChildren[i] is TfrmSuppliers then
begin
MDIChildren[i].Show;
Exit;
end; // if
end; // for
OldCursor := Screen.Cursor;
Screen.Cursor := crHourglass;
try
frmSuppliers := TfrmSuppliers.Create( Application );
finally
Screen.Cursor := OldCursor;
end; // try..finally
end;


GOSTEI 0
POSTAR