Exploring the TimeCheck Application (Part 2)

Last week, in the Exploring the TimeCheck Application (Part 1) post, you saw an overview of what the TimeCheck application will do. Essentially, it’s a time management application that works by recording how you spend your time. Knowing how you spend your time has all sorts of benefits. To start this application, the user needs a method for signing into and out of the system. The main form (frmMain) is displayed when Windows starts. The user chooses a project from the list or types in a custom project, then chooses or types in an activity using this form.


As you can see, this simple form provides the means to sign in or sign out (as needed). It also provides the means necessary to configure the application and to generate reports about activities. If the user clicks Exit when the application begins, the application records an entry in the event log and then exits. For now, let’s look at what you need to do to configure this form.

Control Property Value
Form1 (Name) frmMain
  AcceptButton btnSignIn
  CancelButton btnExit
  FormBorderStyle FixedDialog
  MaximizeBox False
  MinimizeBox False
  ShowInTaskbar False
  Size 300, 165
  Text TimeCheck
  Topmost True
ContextMenuStrip1 (Name) NotificationMenu
NotifyIcon1 (Name) ThisNotifyIcon
  ContextMenuStrip NotificationMenu
  Visible True
ToolTip1 (Name) toolTip1
Button1 (Name) btnSignIn
  AccessibleDescription Sign Into a Project
  Location 207, 12
  Size 75, 23
  TabIndex 0
  Text &Sign In
  ToolTip on toolTip1 Sign Into a Project
Button2 (Name) btnConfigure
  AccessibleDescription Configure the Application Features
  Location 207, 41
  Size 75, 23
  TabIndex 1
  Text &Configure
  ToolTip on toolTip1 Configure the Application Features
Button3 (Name) btnReport
  AccessibleDescription Request a Time Usage Report
  Location 207, 70
  Size 75, 23
  TabIndex 2
  Text &Report
  ToolTip on toolTip1 Request a Time Usage Report
Button4 (Name) btnExit
  AccessibleDescription Exit Without Signing In
  Location 207, 99
  Size 75, 23
  TabIndex 3
  Text &Exit
  ToolTip on toolTip1 Exit Without Signing In
Label1 (Name) lblProjectName
  AccessibleDescription Supply the Name of the Project
  Location 12, 9
  Size 71, 13
  TabIndex 4
  Text &Project Name
  ToolTip on toolTip1 Supply the Name of the Project
ComboBox1 (Name) cbProjectName
  Location 12, 25
  Size 189, 21
  TabIndex 5
Label2 (Name) lblWorkType
  AccessibleDescription Choose the Type of Task Performed
  Location 12, 49
  Size 72, 13
  TabIndex 6
  Text &Type of Work
  ToolTip on toolTip1 Choose the Type of Task Performed
ComboBox2 (Name) cbWorkType
  Location 12, 66
  Size 189, 21
  TabIndex 7

Both frmMain and ThisNotifyIcon have Icon properties that you must fill out. In this case, the application uses a red clock face with the hands set to 3:00. The icon is created using precisely the same technique as described for the GrabAPicture application in the “Exploring the GrabAPicture Application (Part 4)” post.

The NotificationMenu also requires special configuration. In this case, you see a context menu added to frmMain when you select the object. Here’s the entries you need to add to the ContextMenuStrip control.


There isn’t anything fancy about this menu. It simply allows you to perform the tasks that you’d normally perform at the main dialog box. The special Open Window option displays frmMain when you need it (otherwise, the user simply sees an icon in the Notification Area).

You may wonder why NotificationMenu doesn’t include an option for signing out. Generally, the user will sign back into another project when signing out of the first one, except when ending the Windows session, in which case, the application automatically logs the user out. Leaving the Sign Out option off makes it less likely that a user will sign out of a project and then forget to sign into a new one as needed. Of course, you can always add the option when desired.

Next week you’ll see the form used to configure the application, frmConfigure. This form is actually going to appear in two different ways. Administrators will see the full set of configuration options we’ll discuss, while standard users will see a subset of the configuration options designed to meet their specific needs. Because of the duality of this form, you need to spend additional time designing it so that it works equally well for either user type. In the meantime, if you have any questions, please contact me at John@JohnMuellerBooks.com. You can see the next post in this series at Exploring the TimeCheck Application (Part 3).