When the user logs in, the Employee ID is grabbed from the database and assigned to EmpID. I can then use that variable in any form in my application. The issue is, maybe I need the Employee's name or birthday or security level. Each of those would need to be set in the module as a variable and would be assigned at login time - or I would take the EmpID and a new call would need to be made to the database on the forms that need the extra data.

It seems to me, an easier way would be to create a class called Employee. It would have all the properties of an Employee, and maybe methods such as ClockIn and ClockOut.

An instance of the Employee class could be instantiated with the Login form and destroyed upon logout or application exit.

However, I don't know how to do this and keep the instance in scope across all the forms. I mean, I suppose I could use this on frmLogin.vb:

and then refer to it as frmLogin.CurrentEmp in other forms, but it seems like there should be a better way.
It would be nice just to refer to the instance as CurrentEmp. Also, if the login form is closed after the login is complete, the use of the instance goes away, doesn't it?

These types of variables are call static (in C#) or Shared (in VB.NET). If your settings module (I assume it is a module) is good enough for the EmpID, there is no reason to believe that it cannot be good enough for an Employee class implementation. Consider the following:Login.vb -

Public Class Login Private Sub OnClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click If Not String.IsNullOrEmpty(tbName.Text) Then Settings.Employee = New Employee() With {.Name = tbName.Text} Dim frmMain As MainForm = New MainForm() frmMain.Show() End If End SubEnd Class

Module Settings Private fEmployee As Employee Public Property Employee() As Employee Get If fEmployee Is Nothing Then fEmployee = New Employee() Return fEmployee End Get Set(ByVal value As Employee) If Not value Is Nothing AndAlso Not value.Equals(fEmployee) Then fEmployee = value End If End Set End PropertyEnd Module

This article explains how to create and use a custom WaterMark textbox class. The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.
IMAGE OF WATERMARKS
STEPS
Create VB …

It’s quite interesting for me as I worked with Excel using vb.net for some time.
Here are some topics which I know want to share with others whom this might help.
First of all if you are working with Excel then you need to Download the Following
…

In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB.
How Percona can help
Percona can help you determine if Percona Server for MongoDB is the right solution for …

In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…