7
Tepsi simgesine program aracılığıyla bir içerik menüsü eklemek istiyorum, böylece tepsi simgesini sağ tıklattığımda bana menüyü göstermeliyim. Tepsi simgesi için sağ tıklatma olay işleyicisini nasıl yazmalıyım?Sistem tepsisi simgesine ContextMenu program aracılığıyla nasıl eklenir?
aşağıda denedim:
private void Icon_MouseRightClick(object sender, MouseButtonEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Left) // shows error ate button
{
return;
}
if (e.Button == System.Windows.Forms.MouseButtons.Right)
{
// code for adding context menu
}
}
sağ tıklama
NotifyIcon.MouseRightClick += new MouseButtonEventHandler(NotifyIcon_MouseRightClick);
Hiçbir şey aradınız/denediniz mi? – wudzik
@wudzik denediğim kodu yayınladı. – user2622971