Results 1 to 11 of 11

Thread: [RESOLVED] Is building software in VB.NET reliable/fast

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2024
    Posts
    14

    Thumbs down Re: Is building software in VB.NET reliable/fast

    Quote Originally Posted by .paul. View Post
    A usercontrol can be used to encapsulate any code you need. It consists of a UI and the code behind that UI. The UI can contain many regular controls. At run-time, you can add a new instance of a usercontrol to your form, or any container control on your form, and you can dispose of that usercontrol.
    You don’t seem to be understanding how all this works. Try googling “VB.Net UserControl MSDN” and read up on the subject…
    So I should be only using one form and the rest of usercontrols.

    Like for example I want 20/80 view, the 20 is for the sidebar with buttons (user control) then I want the 80 section to be where the buttons go further into functions.

    How would you say one can have the 80 section disappear and show the respective button functions in the 80 section? In the same window not closing and re-opening a new window for it? Without creating it all in the one form or usercontrol.

    I don't think you can....

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Is building software in VB.NET reliable/fast

    Quote Originally Posted by Spixol View Post
    How would you say one can have the 80 section disappear and show the respective button functions in the 80 section? In the same window not closing and re-opening a new window for it? Without creating it all in the one form or usercontrol.

    I don't think you can....
    You're just asking the exact same question that I already answered in another thread. As I said there, you can create a user control for each Button and, when the user clicks a Button, you remove whatever control is currently shown and add a new one. Instead of repeating yourself and expecting a different answer, try using the information you've already been provided. Go and do some research on user controls and you'll find that you already have all the information you need, so it's a waste of your time asking for something else.

    A user control is designed like a form, i.e. you drag controls from the Toolbox onto the design surface and use the code window to write event handlers and any other code required. Once you build your project, the user control will appear in the Toolbox and can then be used like any other control, i.e. dragged from the Toolbox and dropped on a form or another user control. Just like any other control, it can also be added to and removed from a form at run time. All you need to do is add your Buttons to your form and probably add a Panel for the area to contain the user controls. On each Button Click event, just remove the current user control from the Panel and add a new one. There would be a few more details but that's basically it. It's pretty simple but you seem determined to make it harder.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width