c0smyn Posted January 17, 2009 Report Posted January 17, 2009 Minimize/Maximize/Restore/Hide/Show Yahoo! Messenger:---varYahooHandle: HWND; beginYahooHandle := FindWindow('YahooBuddyMain',nil); [color=green]// or FindWindow('YahooBuddyMain','Yahoo! Messenger'); [/color]if YahooHandle <> 0 then beginShowWindow(YahooHandle,sw_minimize); [color=green]// Minimize[/color]ShowWindow(YahooHandle,sw_maximize); [color=green]// Maximize[/color]ShowWindow(YahooHandle,sw_restore); [color=green]// Restore[/color]ShowWindow(YahooHandle,sw_hide); [color=green]// Hide[/color]ShowWindow(YahooHandle,sw_show); [color=green]// Show[/color] end; end;---Change Yahoo! Messenger caption:---varYahooHandle: HWND; beginYahooHandle := FindWindow('YahooBuddyMain',nil);if YahooHandle <> 0 thenSetWindowText(YahooHandle,Pchar('New Caption')); end;---Start Yahoo! Messenger:---Adaugati sus la Uses, ShellApiPuneti aceasta functie sub {$R *.dfm}function GetYahooPath: string; beginif fileexists('C:\Program Files\Yahoo!\Messenger\YahooMessenger.exe') thenresult := 'C:\Program Files\Yahoo!\Messenger\YahooMessenger.exe'elseif fileexists('D:\Program Files\Yahoo!\Messenger\YahooMessenger.exe') thenresult := 'D:\Program Files\Yahoo!\Messenger\YahooMessenger.exe'elseif fileexists('E:\Program Files\Yahoo!\Messenger\YahooMessenger.exe') thenresult := 'E:\Program Files\Yahoo!\Messenger\YahooMessenger.exe'elseShowMessage('Nu se poate gasi Yahoo!Messenger.exe'); end;Acum pentru a porni Yahoo! Messenger folositi urmatorul cod:ShellExecute( 0, 'open', PChar(GetYahooPath),nil, nil, SW_SHOW );---Close Yahoo! Messenger:--- beginwinexec('taskkill /f /im YahooMessenger.exe',sw_hide);winexec('taskkill /f /im YAHOOM~1.exe',sw_hide); end;--- Quote