Here I am trying to run some window based application(s) inside a window form's panel and allow me to minimize it inside. i was able to run and minimize inside this "notepad.exe" but not with win apps.
here's my code for reference(working only for notepad):
[DllImport("USER32.DLL")]
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);[DllImport("USER32.dll")]
private static extern bool MoveWindow(IntPtr hwnd, int x, int y, int cx, int cy, bool repaint);
Process process = Process.Start("someapp.exe");
process.WaitForInputIdle();
SetParent(process.MainWindowHandle, this.panel1.Handle);
MoveWindow(process.MainWindowHandle, 0, 0, this.Width - 90, this.Height, true);
please kindly tell me if it's possible to achieve and how?