events in notify icon not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • namrataa
    New Member
    • Mar 2008
    • 15

    events in notify icon not working

    i have the following code for my notify.cs file
    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Linq;
    using System.Text;
    
    namespace startProjmedia
    {
        public partial class notify : Component
        {
            public notify()
            {
                InitializeComponent();
            }
    
            public notify(IContainer container)
            {
                container.Add(this);
    
                InitializeComponent();
                
                hide.Click += hide_click;
                show.Click += show_click;
                
                
                
            }
    
            private startProjmedia.Window1 w = new startProjmedia.Window1();
            //private Window1 w = new Window1();
    
            private void hide_click(object sender, EventArgs e)
            {
                System.Windows.MessageBox.Show("Hello");
                w.Hide();
         
                //w.c
                //w.Deactivated();
            }
    
    
            private void show_click(object sender, EventArgs e)
            {
                System.Windows.Forms.MessageBox.Show("show window");
                w.Show();
            }
    }
    }
    if u give any other command to embedded in the context other than hide and show it does not recgnise.i thk its because , hide and show are inbuilt.hide and show are displayed in the context menu but does not react on click events.
    can u give any solution please...
    m i missing anythg?
    please help...
    Last edited by Plater; Mar 13 '08, 12:54 PM. Reason: code tags
Working...