0

I am opening an inventor window from my c# windows form app code. like this:

        Process proc = System.Diagnostics.Process.Start(@"C:\Users\Guest1\Desktop\model.iam");
        

        proc.WaitForInputIdle();

        while (proc.MainWindowHandle == IntPtr.Zero)
         {
           
         Thread.Sleep(100);
         proc.Refresh();
         }

to keep the window inside my working window I have used this command:

        SetParent(proc.MainWindowHandle, this.Handle);

Then I have put it inside a panel:

        SetParent(proc.MainWindowHandle, this.panel1.Handle);

the problem is that it comes in a default location inside the panel.

I want it to come out to the panel's corner when I run the code without editing the location manually. by doing this, the parameter taps are hidden so only my drawings can be shown.

I have tried commands like:

        Point parentPoint = new Point(x, y);

and SetDisplayRectLocation(x, y);

Can anyone help me?

0 Answers0