forcer la fenêtre Dos sur un Tpanel D6 et Windows 10 en gardant la structure existante !
Bonjour à toutes et à tous,
Depuis un moment j'essaie d'afficher avec mon code la fenêtre Dos dans un Tpanel en gardant cette structure.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
begin
h:=0;
ExecuteFile:='Monfichier.bat';
FillChar(SEInfo, SizeOf(SEInfo), 0) ;
SEInfo.cbSize := SizeOf(TShellExecuteInfo) ;
with SEInfo do begin
fMask := SEE_MASK_NOCLOSEPROCESS;
Wnd := Application.Handle;
lpFile := PChar(ExecuteFile) ;
nShow := SW_SHOWNORMAL;
end;
if ShellExecuteEx(@SEInfo) then begin
repeat
Application.ProcessMessages;
end; |
J'avais testé ceci :
Code:
1 2 3 4 5 6 7
|
try
while h=0 do
h:=findwindow('ConsoleWindowClass',FileMSDos); // ConsoleWindowClass
Windows.SetParent(h,Panel1.handle);
SetWindowPos(h,HWND_TOP,-2,-2,panel1.width +0,panel1.height +0,SWP_SHOWWINDOW);
form1.ActiveControl := panel1;//Donne le focus |
Mais je n'arrive pas à le placer dans mon code
Si quelqu'un a une idée merci d'avance.
Excellent dimanche.
@+,
cincap