I'm using Straus7 API with C# and through an API. I can open a window dialog of the model but it opens like a popup dialog. How can I embed that windows dialog into my C# form? I don't want a popup dialog, how can I achieve this?
image Thanks to @Mihail, i write this code and it work. My final code is:
/////////////////////////////////////////////////
St7.St7CreateModelWindow(1);
St7.St7ShowModelWindow(1);
St7.St7PositionModelWindow(1, 0, 0, 640, 480);
St7.St7ShowWindowTopPanel(1);
/////////////////////////////////////////////////
int temp = 0;
St7.St7GetModelWindowHandle(1, ref temp);
IntPtr hostHandle = new IntPtr(temp);
IntPtr guestHandle = new WindowInteropHelper(this).Handle;
//SetParent(guestHandle, hostHandle);
SetParent(hostHandle, guestHandle);
Now it need only some adjustment.
I think you can use the following code :
this.IsMdiContainer = true;
Form Form = new Form();
Form.MdiParent = this;
Form.Show();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.