CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006
    Posts
    13

    Unhappy Disable Mouse Click?

    Hoe to disable a mouse click on the form ??

  2. #2
    Join Date
    Oct 2005
    Location
    Islamabad, Pakistan
    Posts
    1,277

    Re: Disable Mouse Click?

    Method invoked on click event of form
    Code:
    private void Form1_Click(object sender, System.EventArgs e) 
    { 
     MessageBox.Show("FORM CLICKED"); 
    }
    Add handler for click event of form when needed.
    Code:
    this.Click += new EventHandler(Form1_Click);
    And remove it when donot need the event to occur
    Code:
    this.Click -= new EventHandler(Form1_Click);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured