• Log in or sign up for an account here: https://www.sythe.org/login

Threads and FormClosing

Threads and FormClosing
Couldn't you also do this.

Code:
this.FormClosing {press tab 2 times}
 
Threads and FormClosing
im using visual studio its the same, after i re-read what you posted i got what you meant lol. i never knew about that xD
 
Threads and FormClosing
im using visual studio its the same, after i re-read what you posted i got what you meant lol. i never knew about that xD
hehe ok good, I'm glad I could help :)

and I'm sorry Swan.. will do that next time :laugh:



Couldn't you also do this.

Code:
this.FormClosing {press tab 2 times}
ehh, no I don't think so... I guess you want to close the form when you have pressed Tab two times... I'm pretty sure there is better ways to do it but this could be one way :p

Code:
        bool keyPressedOnce = false;
        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Tab && keyPressedOnce == true)
            {
                this.Dispose();
            }
        }

        private void Form1_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Tab)
            {
                keyPressedOnce = true;
            }
        }
 
Threads and FormClosing
hehe ok good, I'm glad I could help :)

and I'm sorry Swan.. will do that next time :laugh:




ehh, no I don't think so... I guess you want to close the form when you have pressed Tab two times... I'm pretty sure there is better ways to do it but this could be one way :p

Code:
        bool keyPressedOnce = false;
        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Tab && keyPressedOnce == true)
            {
                this.Dispose();
            }
        }

        private void Form1_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Tab)
            {
                keyPressedOnce = true;
            }
        }
No, you put that in the code and it generates a function that automaticly handles the form closing event. lol.
 
Runescape Gamblingrunescape gambling
Back
Top