I want to use a win-form in C# and display its contents or the whole form in a panel used in another form.
Lets say i have a form A with a panel Panel_of_A and a form B with a panel Panel_of_B
I want to display contents of Panel_of_A into Panel_of_B or you may say i want to use Panel_of_A in another form.
Or you may provide help for displaying a form say A into a panel on form B.
Hope i made u understand my thoughts...
Press "Ctrl" and drag your mouse to duplicate a existing form class file. Then exlude the existing form class file from the project. Rename the new form class file.
Using the win32 API it is possible to "eat" another application. Basically you get the top window for that application and set it's parent to be the handle of the panel you want to place it in. If you don't want the MDI style effect you also have to adjust the window style to make it maximised and remove the title bar.
I think a better way for doing this is to create a User Control which contains that panel and (re)use it on both forms.
Here is a tutorial how to create User Controls on MSDN.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With