1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[HELP NEEDED] What's wrong whit this??

Discussion in 'Programming' started by NonLeaf, Sep 19, 2010.

  1. NonLeaf

    NonLeaf Well-Known Member

    This is not activating my checkbox while pressing f1 in game, what's wrong?

    Code (Text):
    1. void Form1::timer2_Tick(System::Object^  sender, System::EventArgs^  e)
    2. {
    3.      
    4.     if (GetAsyncKeyState(VK_F1) & 0x8000)
    5.     {
    6.             if (Form1::checkBox1->Checked == false)
    7.         {
    8.                     Form1::checkBox1->Checked = true;
    9.         }
    10.             else
    11.         {
    12.         Form1::checkBox1->Checked = false;
    13.         }
    14.     }
     
  2. whereismyhat

    whereismyhat Banned Banned

    Removing '& 0x8000' might sound like an idea.
     
  3. NonLeaf

    NonLeaf Well-Known Member

    & 0x8000 stands for all keys lawl. but thx anyway
     
  4. Fury

    Fury <marquee><font color="#FFBF00"><b>Official CCPLZ G Banned

    dont you have to put a "}" for all "{" ?
    idk if this is correct
    Code (Text):
    1. void Form1::timer2_Tick(System::Object^  sender, System::EventArgs^  e)
    2. {
    3.      
    4.     if (GetAsyncKeyState(VK_F1) & 0x8000)
    5.     {
    6.               if (Form1::checkBox1->Checked == false)
    7.         {
    8.                        Form1::checkBox1->Checked = true;
    9.         }
    10.               else
    11.         {
    12.         Form1::checkBox1->Checked = false;
    13.         }
    14.     }
    15. [COLOR="Red"]}[/COLOR]
     
  5. NonLeaf

    NonLeaf Well-Known Member

    Yeah your right, @ testing
     

Share This Page