Groups | Search | Server Info | Login | Register
Groups > it.comp.lang.delphi > #18134
| From | "Alessandro B." <bobbo@tecnosoft.it> |
|---|---|
| Newsgroups | it.comp.lang.delphi |
| Subject | Re: Richiamare un programma "minimizzato" da un altro programma |
| Date | 2025-06-24 06:33 +0200 |
| Organization | Tecnosoft |
| Message-ID | <103d9ro$1ptim$1@dont-email.me> (permalink) |
| References | <1036jpb$14suq$1@dont-email.me> <103bnjt$1a7qm$1@dont-email.me> |
> Daniele was thinking very hard :
>> Ciao a tutti,
>> come posso fare per rendere visibile un programma minimizzato nella
>> barra delle applicazioni o nella traybar da un altro programma?
Ciao,
in passato ho utilizzato la funzione
Handle := FindWindow( PChar(Title),Nil );
per estrarre l'handle di una finestra dal nome, in questo caso
utilizzando il ClassName
In alternativa utilizzando il WindowName
Handle := FindWindow( Nil,PChar(Title) );
Altre volte con una scansione delle finestre
// Get the first window
Handle := GetWindow(GetWinApplicationHandle, GW_HWNDFIRST);
while Handle > 0 do begin
// retrieve its text
GetWindowText(Handle, NextTitle, 255);
if Pos(Title, StrPCharToPas(@NextTitle)) <> 0
then begin
Result := Handle;
Exit;
end;
// Get the next window
Handle := GetWindow(Handle, GW_HWNDNEXT);
end;
In tutti i casi è l'handle che ti serve.
Quando hai localizzato l'handle dovrebbe funzionare questa, dove io
utilizzavo una groupbox con le selezioni applicabili:
Minimizza
Massimizza
Ripristina
Nascondi
Visualizza
Chiudi
{ --- Opzioni dirette sulla finestra --- }
case grWndOpt.ItemIndex of
0: ShowWindow ( Handle , SW_MINIMIZE );
1: ShowWindow ( Handle , SW_MAXIMIZE );
2: ShowWindow ( Handle , SW_NORMAL );
3: ShowWindow ( Handle , SW_HIDE );
4: ShowWindow ( Handle , SW_SHOW );
5: SendMessage( Handle , WM_SYSCOMMAND, SC_CLOSE, 0);
end;
Back to it.comp.lang.delphi | Previous | Next — Previous in thread | Next in thread | Find similar
Richiamare un programma "minimizzato" da un altro programma Daniele <daniele.xxxx@yyyyy.ww> - 2025-06-21 17:40 +0200
Re: Richiamare un programma "minimizzato" da un altro programma Roberto <dash@dominus.net> - 2025-06-23 16:16 +0200
Re: Richiamare un programma "minimizzato" da un altro programma "Alessandro B." <bobbo@tecnosoft.it> - 2025-06-24 06:33 +0200
Re: Richiamare un programma "minimizzato" da un altro programma Daniele <daniele.xxxx@yyyyy.ww> - 2025-06-25 12:07 +0200
csiph-web