The program should have been embedded button leading to an external exe-shnik. There is a string variable Path, to which I assigned the current path at the beginning:
Path:=extractfilepath(paramstr(0)); With this variable, my browser switched between pages.
if Node.StateIndex = 8 then WebBrowser1.Navigate(Path+'kek\l5.htm'); But when I do the same with that external exe-schnick, then it no longer works. Here I open the external file at the click of a button:
procedure TForm1.BitBtn1Click(Sender: TObject); begin ShellExecute(handle,'open','C:\Users\Пользователь1\Desktop\kekek\test.exe',nil,nil,SW_SHOW); end; This only works if I write the full path, which of course is no good. If I do this:
ShellExecute(handle,'open',Path+'test.exe',nil,nil,SW_SHOW); Then the error [Error] Unit1.pas (292): Incompatible types: 'String' and 'PAnsiChar' appears.
Please tell me how to fix this code, or some other way to open an external file.
PChar(Path+'test.exe')- Grundy