T
Thief_
I have two projects in one solution:
a.. Outlook Monitor
b.. Tray Notification
Both contain a form called "Form1.vb". How do I reference "Outlook
Monitor"'s Form1 from "Tray Notification"'s form1? Here's my code example
taken from "Tray Notification"'s form1:
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'--- Create ContextMenu
'Dim TrayContextMenu As ContextMenu = New ContextMenu
'Add itens on ContextMenu
TrayContextMenu.MenuItems.Add("&Restore", New
System.EventHandler(AddressOf Me.mnuRestore_click))
TrayContextMenu.MenuItems.Add("-")
TrayContextMenu.MenuItems.Add("&Exit", New
System.EventHandler(AddressOf Me.mnuExit_click))
'--- Create NotifyIcon
'Dim TrayNotifyIcon As BalloonTip = New BalloonTip
' Show Notify Icon
TrayNotifyIcon.Text = Me.Text ' Help text for MouseLeave on Icon
TrayNotifyIcon.Icon = Me.Icon ' Icon for NotifyIcon
TrayNotifyIcon.Form = Me ' Form to restore when DoubleClick on Icon
TrayNotifyIcon.ContextMenu = TrayContextMenu ' ContextMenu for
RightClick on Icon
TrayNotifyIcon.Visible = True ' Show icon in TaskBar
' Show Balloon Tip
TrayNotifyIcon.ShowBalloon(Me.Text, "Line 1" + vbLf + "Line 2",
BalloonTip.NotifyInfoFlags.Info, 1000)
End Sub
I want to change the three lines of code under the line "' Show Notify Icon"
to reference the other project's form.
a.. Outlook Monitor
b.. Tray Notification
Both contain a form called "Form1.vb". How do I reference "Outlook
Monitor"'s Form1 from "Tray Notification"'s form1? Here's my code example
taken from "Tray Notification"'s form1:
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'--- Create ContextMenu
'Dim TrayContextMenu As ContextMenu = New ContextMenu
'Add itens on ContextMenu
TrayContextMenu.MenuItems.Add("&Restore", New
System.EventHandler(AddressOf Me.mnuRestore_click))
TrayContextMenu.MenuItems.Add("-")
TrayContextMenu.MenuItems.Add("&Exit", New
System.EventHandler(AddressOf Me.mnuExit_click))
'--- Create NotifyIcon
'Dim TrayNotifyIcon As BalloonTip = New BalloonTip
' Show Notify Icon
TrayNotifyIcon.Text = Me.Text ' Help text for MouseLeave on Icon
TrayNotifyIcon.Icon = Me.Icon ' Icon for NotifyIcon
TrayNotifyIcon.Form = Me ' Form to restore when DoubleClick on Icon
TrayNotifyIcon.ContextMenu = TrayContextMenu ' ContextMenu for
RightClick on Icon
TrayNotifyIcon.Visible = True ' Show icon in TaskBar
' Show Balloon Tip
TrayNotifyIcon.ShowBalloon(Me.Text, "Line 1" + vbLf + "Line 2",
BalloonTip.NotifyInfoFlags.Info, 1000)
End Sub
I want to change the three lines of code under the line "' Show Notify Icon"
to reference the other project's form.