Go Back   Access World Forums > Apps and Windows > VB.NET

Thread Tools Rate Thread Display Modes
Old 12-26-2013, 09:49 PM   #1
IT dude
Join Date: Aug 2013
Location: Where you live
Posts: 41
Thanks: 5
Thanked 0 Times in 0 Posts
Surka is on a distinguished road
Question Load form on TabControl

Dear all,
I am working on a VB .Net project, with Visual Studio 2013.
Currently I am using Windows Forms with the following design:
  • MainForm with a MenuStrip and a TabControl.
  • newUserForm, with controls in it to create a new user.
I want to load the newUserForm on the TabContro, and I read I have 2 options, and 2 questions came out:
1 - Copy an paste code from newUserForm to the MainForm, and copy and paste controls to the TabControl.
Should I paste the code from newUserForm_Load into MainForm_Load or into TabControl_Click?

2 - Make of newUserForm a control.
How do I convert the form into a Control?
Also, keep in mind that I am on the beginning of the project: is copy and paste a good solution?

I hope to get help on this,


Surka is offline   Reply With Quote
Old 01-29-2019, 10:51 PM   #2
Newly Registered User
Join Date: Jan 2019
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
vedika is on a distinguished road
Re: Load form on TabControl

You handle the Click event when you to do something when the user clicks something. That's most usual for a Button but might be logical for some other controls too. Doing something when the user clicks a TabControl would be unusual to say that least. SelectedIndexChanged might be more usual. But surely if you would do something on the Load event of a form then what you want to do is initialisation so you will only want to do it when you first add a TabPage. If so then that's got nothing to do with clicking the TabControl.
vedika is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
tabcontrol MiriamLear General 18 02-17-2013 01:32 PM
tabcontrol sven2 Modules & VBA 0 08-17-2007 09:04 AM
Set TabControl focus from seperate form rainman89 Forms 2 04-04-2007 05:52 AM
set a tabcontrol.value??? casey Forms 2 04-25-2003 11:09 AM
Tabcontrol..!!! pacgoncalves Forms 1 02-28-2002 06:54 AM

All times are GMT -8. The time now is 05:43 AM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World