(Gast)
n/a Beiträge
|
AW: Zwei Windows Explorer starten und nebeneinander bildschirmfüllend positionieren
24. Jun 2015, 00:11
Andere Version - aber die Version in #2 gefällt mir besser...
Delphi-Quellcode:
Function CallFileName( pFileName, pParameter : PChar): THandle;
var SEI: TShellExecuteInfo;
begin
FillChar(SEI, SizeOf(SEI), 0);
SEI.cbSize := SizeOf(SEI);
SEI.fMask := SEE_MASK_NOCLOSEPROCESS;
SEI.Wnd := GetTopWindow(0);
SEI.lpVerb := 'OPEN';
SEI.lpFile := pFileName;
SEI.lpParameters := pParameter;
SEI.lpDirectory := '';
SEI.nShow := SW_SHOWNORMAL;
SEI.hInstApp := 0;
SEI.hProcess := 0;
ShellExecuteEx( @SEI );
Sleep(500);
Result := SEI.hProcess;
end;
procedure TForm1.Button1Click(Sender: TObject);
var tmpHandle : THandle;
begin
tmpHandle :=CallFileName(PChar('Explorer.exe'), PChar('F:\TOOLS'));
MoveWindow(GetForegroundWindow, 0, 0,(Screen.Width div 2), Screen.WorkAreaHeight, True);
tmpHandle :=CallFileName(PChar('Explorer.exe'), PChar('C:\'));
MoveWindow(GetForegroundWindow, Screen.Width div 2, 0,(Screen.Width div 2), Screen.WorkAreaHeight, True);
end;
|
|
Zitat
|