Si sto scivendo in delphy 11.3 common, in coui per mavigere si usa navigete,
se potete provate il codice.
grazie
Questo è tutto il codice delphy che ho scritto :
procedure TFRMprincipale.Button1Click(Sender: TObject);
begin
if (edit1.Text = '')
then system.exit;
end;
procedure TFRMprincipale.info1Click(Sender: TObject);
begin
ABOUTbox.showmodal
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
function EnumProcess(Handle: HWND; lParam: Integer): BOOL; stdcall;
var
PID : Cardinal;
Title : String;
begin
If Handle = NULL Then
begin
Result := False;
end
Else
begin
GetWindowThreadProcessID(Handle,PID);
If PID = lParam Then
begin
SetForegroundWindow(Handle);
Result := False;
end
else
Result := True;
end;
end;
procedure TMainForm.StartBrowser();
var
h: HWND;
S: tagPROCESSENTRY32;
bFound: boolean;
begin
h := CreateToolHelp32Snapshot(TH32CS_SNAPPROCESS, 0);
S.dwSize := SizeOf(tagPROCESSENTRY32);
Process32First(h, S);
bFound := false;
while Process32Next(h, S) do
begin
if Pos('iexplore', LowerCase(S.szExeFile)) <> 0 then
begin
bFound := true;
EnumWindows(@EnumProcess,Integer(Pointer(S.th32ProcessID)));
end;
end;
if (not bFound) then
ShellExecute(Handle, 'open', 'http://www.stackoverflow.com', nil, nil, SW_SHOWNORMAL);
end;
end.