Hey fellow delphirinos,
I am currently using the following code to get an application in my application:
procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Application.Handle,'Open','Notepad.exe' ,nil,nil,SW_NORMAL);
//Wait for it to be loaded.
Sleep(500);
//Get the handle of the other program using the caption of the window.
wHandle := FindWindow(NIL,'Untitled - Notepad');
//Now change the parent of the other program to be your program.
Windows.SetParent(wHandle,self.Handle);
end;
That works as in, its giving me notepad in my application as a moveable window like application. (im testing with notepad but that's not the app I eventually want to use).
But now the question, I want the app as a borderless window in a fixed location on my form (I got a sort of space reserved in my form where iwant to load the app in, but its silly to have a window title and close button etc for the "inside application".. So how do I load it without any borders/title/minimize,close top right buttons and in a location I want on my form ?