I want to show the UserControl into the form, this means i need a single form to perform like multiple form
See this image for details:
Can someone help me how to?, and one again, what's the type must i choose to use the usercontrol (Standard EXE, ActiveX EXE, or else).
NOTE: Please DON'T close this question, i just want to know. and thanks.
1- Close UserControls in your designer to made them available in toolbox.
2- Drag & Drop them on your main form, made them same size...
3- Use code like this for your operations:
Private Sub Operation1()
UserControl1.Visible = True
UserControl2.Visible = False
End Sub
Private Sub Operation2()
UserControl1.Visible = False
UserControl2.Visible = True
End Sub
[Choose UserControl type!]
The simplest way, albeit terribly inelegant is to add all the controls to the form and set their visible state as required. THis is normally considered to be somewhat of a kludge though.
The problem lies not with the user controls or programming environment but that the design does not follow a typical Windows UI 'flow'. You might want to redesign based on a more useable workflow.
It's possible that you're simply asking how to use UserControls in a VB project, if so then you should develop the UserControls in one project, make it (so that they get added to the toolbox), and then develop the form in another project using the new UserControls from the Toolbox. For debugging Usercontrols you will need to run two instances of VB, one with the Usercontrols project and the other with the form.
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