Forum: Object-Pascal / Delphi-Language
Delphi
by WojTec,
23. Sep 2011
This is my source. How can improve it?
var
hWnd, hProc: Cardinal;
pId: DWORD;
begin
Result := False;
hWnd := FindWindow('Progman', 'Program Manager');
GetWindowThreadProcessId(hWnd, @pId);
Forum: Object-Pascal / Delphi-Language
Delphi
by WojTec,
23. Sep 2011
I nned restert explorer.exe to take effect my proggy applied.
I kill explorer.exe, check if killed, if yes I call:
ShellExecute(HInstance, 'open', 'explorer', nil, nil, SW_NORMAL)
But sometimes on start explorer.exe opens window (in 7 Library), on XP always opens some window (but I don't remember which location). How can run it without any surprises?