locked
Mouse down RRS feed

  • Question

  • hi i am making a game but i am stuck on how to disable or stop mouse down. My game involves shooting but once the number of bullets equals 0 i want to disable mouse down left but i don't know how so could you please help thanks 
    Saturday, August 3, 2013 11:52 PM

All replies

  • Hi ninja14z,


    Welcome to the MSDN forum.


    Per your description, I need to clarify some details with you.

    1.What’s your project type?
    2.What’s your programming language?

    We need more info for example your code to diagnose this issue.


    Have a nice day!

    Damon


    Damon Bu - MSFT
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, August 5, 2013 5:18 AM
  • Hi,

    Did you handle MouseDown event in you form.

    If you don't want to do anything when mouse left button is down, you can do something as follows:

    void Form1_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
                  return;
        }


    Microsoft MVP - ASP/ASP.NET

    Monday, August 5, 2013 5:21 AM
  • Maybe it's can help you:

    private void form_MouseDown(object sender, ItemCheckEventArgs e) { if (dontRunHandler) return; dontRunHandler = true;

    // Your code

    dontRunHandler = false; }



    Monday, August 5, 2013 7:43 AM