i'm using win32 API SetParent to run an external app in a winform, and i need switch 2 deferent tabs by clicking on the child window. Can i do that?
i have a video to decribe this: https://youtu.be/bS5hNfQO92M
public Form1()
{
InitializeComponent();
ProcessStartInfo p2 = new ProcessStartInfo("flash.exe");
p2.WindowStyle = ProcessWindowStyle.Minimized;
Process p = Process.Start(p2);
p.WaitForInputIdle();
SetParent(p.MainWindowHandle, panel1.Handle);
p2.WindowStyle = ProcessWindowStyle.Normal;
MoveWindow(p.MainWindowHandle, 0, 0, 350, 350, true);
}
[DllImport("user32.dll")]
static extern IntPtr SetParent(IntPtr hwc, IntPtr hwp);
[DllImport("user32.dll", SetLastError = true)]
internal static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);