BigBwoi2001
Member
- Joined
- Jul 4, 2008
- Sythe Gold
- 0
- Messages
- 54
Couldn't you also do this.
Code:
this.FormClosing {press tab 2 times}
this.FormClosing {press tab 2 times}
hehe ok good, I'm glad I could helpim 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
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 wayCouldn't you also do this.
Code:this.FormClosing {press tab 2 times}
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.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
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; } }
ehh huh?No, you put that in the code and it generates a function that automaticly handles the form closing event. lol.
ahh, lol! I know that but I misunderstood what you meant with "Press tab 2 times" xD but yes you're right, I'm sorryhttp://tinypic.com/usermedia.php?uo=BU5A/LSNs0MP04Wd+aK/mA==
At the part where i was typing "this.FormClosing" and pressing tab and nothing happened, i forgot to put the "+=" afterwards, either way will work.
haha its kwl, I knew I didn't word it to well.ahh, lol! I know that but I misunderstood what you meant with "Press tab 2 times" xD but yes you're right, I'm sorry![]()

