Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6649669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:48:06+00:00 2026-05-26T00:48:06+00:00

Using VB.Net I am having the form name as Employee Entry User want to

  • 0

Using VB.Net

I am having the form name as “Employee Entry”

User want to open a Employee Entry from in 5 tabs…

For Example

When the user open a Employee Entry form, while entering the details at that same time, user again open a employee entry form (2nd Employee entry form show like a new employee entry from with out any details)

More Example

We can open Google, Yahoo, in one browser (by using Tab Function).

How to make this.

Need vb.net code Help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:48:07+00:00Added an answer on May 26, 2026 at 12:48 am

    I’m assuming this is WinForms? You should design your Employee Entry as a User Control. You can then add a new instance of that control to your Form on each request of a new Employee. You would most likely have a seperate Employee object that you could pass to each instance of your EmployeeEntry user control.

    EDIT1

    Create a form with a menu strip across the top and a menu item called tsmiNewEmployee. Add a tab control to the form named tabEntryForms and set its fill style to Dock. Delete all default tab pages from it.

    Add Class:

    public class EmployeeRecord
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public DateTime HireDate { get; set; }
    }
    

    Add USerControl named EmployeeEntry. Puts osme Firts/Last name edit cotrols on it, etc. Add a Save button and a Cancel Button.

    public partial class EmployeeEntry : UserControl
    {
    
        public event EventHandler Save;
    
        public event EventHandler Cancel;
    
        private EmployeeRecord empBeingEdited = null;
    
        public EmployeeRecord Employee
        {
            get 
            {
                return empBeingEdited; 
            }
            set 
            {   
                empBeingEdited = value;
                if (empBeingEdited == null)
                {
                    // clear controls
                }
                else
                { 
                    // populate controls with employee values
                }
            }
        }
    
        public EmployeeEntry()
        {
            InitializeComponent();
        }
    
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (Save != null)
                Save(this, EventArgs.Empty);
        }
    
        private void btnCancel_Click(object sender, EventArgs e)
        {
            if (Cancel != null)
                Cancel(this, EventArgs.Empty);
        }
    }
    

    And in your main form that has the tab control:

    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }
    
        private void tsmiNewEmployee_Click(object sender, EventArgs e)
        {
    
            TabPage tab = new TabPage("New Employee Entry");
    
            EmployeeEntry empEntry = new EmployeeEntry();
            empEntry.Employee = new EmployeeRecord();
    
            empEntry.Save += new EventHandler(EmployeeEntry_Save);
            empEntry.Cancel += new EventHandler(EmployeeEntry_Cancel);
    
    
            tab.Controls.Add(empEntry);
            empEntry.Dock = DockStyle.Fill;
    
            tabEntryForms.TabPages.Add(tab);
    
        }
    
        private void EmployeeEntry_Save(object source, EventArgs args)
        {
            EmployeeEntry empEntry = source as EmployeeEntry;
    
            MessageBox.Show("Saved");
    
            TabPage parentTab = empEntry.Parent as TabPage;
            parentTab.Controls.Remove(empEntry);
            tabEntryForms.Controls.Remove(parentTab);
    
    
        }
    
        private void EmployeeEntry_Cancel(object source, EventArgs args)
        {
            EmployeeEntry empEntry = source as EmployeeEntry;
    
            MessageBox.Show("NOT Saved");
    
            TabPage parentTab = empEntry.Parent as TabPage;
            parentTab.Controls.Remove(empEntry);
            tabEntryForms.Controls.Remove(parentTab);
    
    
        }
    }
    

    That should get you started.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently using ASP.NET MVC 2.0 RC2, having recently moved from version 1.0.
I am using asp.net MVC and I am having an issue posting a form
Im having trouble using a .NET COM in vb6, It compiles ok and I
I'm using ASP.NET MVC + NHibernate + Fluent NHibernate and having a problem with
I am having problems converting a string in the format yyyy-MM-ddZ using VB.net. For
I'm having issues deserializing certain Guid properties of ORM-generated entities using protobuf-net. Here's a
I'm developing a website (using asp.net by the way) and I'm having a problem
I'm having a really frustrating error trying to secure an ASP.NET application using the
I am wondering what experiences people are having using the ASP.NET MVC Framework? In
I'm having trouble getting Spring.Net to log, using Log4Net. I'm particulary interested in seeing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.