i'll try to help with simple solution
1. create user control contains your groupbox
2. in the form designer, place that user control in your tab
3. if the specific button you mention before clicked, add new tab, create new instance of user control described above, place that control in your new tab
4. if you don't understand what i talk about you must :
- understand what is OOP
- understand how to create and place control in parent control at runtime
program is hobby that make some money as side effect
You can't actually have a reference, a control can only be in one place at a time, so you've got no problem there.
Like people have said, you will need to create a new instance of the controls and add these new controls to the tab.
To see how you can create, setup, and add controls, just check the designers generated code.
My current favourite word is: I'm starting to run out of fav. words!
I am with a C#.net Inventory application in one of my form there is a datetimepicker whose value my change according to some selections how can I set the datetimpicker value back to current datetime on a buttion click. I put like datetimepicker1.Text=DateTime.Now.Date.ToString(); but its text is not getting the current datetime
I have a native dll that I am interfacing through P/Invoke. I have created the API, but have no way to debug the native code. I tried using windbg for this, but couldn't figure out how. So, my current alternative is to have the native code print to stdout/stderr using fprintf. However, I can't find any way to see this output in C#. Is there a way to capture stdout/stderr output from the native code?
what I tend to do in such case is I pass a managed delegate that takes a string and logs it somehow;
the unmanaged side accepts it as a pointer to a function that takes one char* as a parameter.
Each time I want to log some native thing, I call the function pointer, and the managed world
logs it (together with, and in sync with, the managed logging).
Hence no capturing stdout/stderr, just passing a delegate.