How can i open an url
after user clicked on NotifyIcon
?
this is my code
public void ShowNotofication(string messages, string url)
{
var notification = new System.Windows.Forms.NotifyIcon()
{
Visible = true,
Icon = System.Drawing.SystemIcons.Information,
// optional - BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info,
// optional - BalloonTipTitle = "My Title",
BalloonTipText = messages,
};
notification.BalloonTipClicked += new EventHandler((sender, e) => OpenChrome(url));
notification.ShowBalloonTip(5000);
}
public void OpenChrome(string url)
{
Process process = new Process();
process.StartInfo.FileName = @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe";
process.StartInfo.Arguments = url + " --new-window";
process.Start();
}
Notification are showed but OpenChrome
method never called.
how can i fix it?