Here's my sub for creating a new tray icon with a context menu! Many thanks to you guys for helping out.

VB Code:
  1. Sub CreateTrayIcon()
  2.         'creates a new tray icon
  3.         Dim TrayIcon As New System.Windows.Forms.NotifyIcon
  4.  
  5.         'creates a new icon
  6.         Dim Icon As New System.Drawing.Icon("C:\icon.ico")
  7.  
  8.         'assigns the icon to the tray icon
  9.         TrayIcon.Icon = Icon
  10.  
  11.         'makes the trayicon visible
  12.         TrayIcon.Visible = True
  13.  
  14.         'Sets the text on the menu item
  15.         mnuQuit.Text = "Quit"
  16.  
  17.         'Creates a new context menu
  18.         Dim TrayIconContextMenu As New System.Windows.Forms.ContextMenu
  19.  
  20.         'Adds items to the new context menu
  21.         TrayIconContextMenu.MenuItems.Add(mnuQuit)
  22.  
  23.         'Assigns the created contextmenu to the trayicon
  24.         TrayIcon.ContextMenu = TrayIconContextMenu
  25.     End Sub

Now I'm left with one last problem. My context menu is totally unresponsive to being clicked when the program is running. I've tried putting it in a thread, but that was just pointless as the icon disappears when the thread stops running.