Click here to Skip to main content
15,896,453 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How could a function read any type of variable's value and return it as a string? Pin
Eddy Vluggen15-Feb-09 7:49
professionalEddy Vluggen15-Feb-09 7:49 
QuestionKeyDown Event keeps firing Pin
Zaegra14-Feb-09 23:25
Zaegra14-Feb-09 23:25 
AnswerRe: KeyDown Event keeps firing Pin
Wendelius15-Feb-09 0:57
mentorWendelius15-Feb-09 0:57 
AnswerRe: KeyDown Event keeps firing Pin
riced15-Feb-09 0:59
riced15-Feb-09 0:59 
GeneralRe: KeyDown Event keeps firing Pin
Zaegra15-Feb-09 2:23
Zaegra15-Feb-09 2:23 
GeneralRe: KeyDown Event keeps firing Pin
riced15-Feb-09 2:48
riced15-Feb-09 2:48 
AnswerRe: KeyDown Event keeps firing Pin
Eddy Vluggen15-Feb-09 3:27
professionalEddy Vluggen15-Feb-09 3:27 
GeneralRe: KeyDown Event keeps firing Pin
Luc Pattyn15-Feb-09 9:56
sitebuilderLuc Pattyn15-Feb-09 9:56 
Hi,

don't try anything that adds state variables (such as a KeyIsDown variable) since that is bound to fail under special circumstances (e.g. when the app looses focus in between a key going down and up again, the state variable will be incorrect on the next KeyDown, which then won't get processed since KeyIsDown is still true...)

You don't need to track the modifier keys (ALT, CTRL, SHIFT) at all, the system does that for you: you can get their immediate value at all times; in particular there is Control.ModifierKeys which always reflects the current situation; but there is even better: each KeyDown event has a KeyEventArgs which holds properties Alt, Control, Shift.

So simply check the key is F4 and Alt is true.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


AnswerRe: KeyDown Event keeps firing Pin
Samir Ibrahim15-Feb-09 22:22
Samir Ibrahim15-Feb-09 22:22 
QuestionVersion check Pin
JR21214-Feb-09 20:50
JR21214-Feb-09 20:50 
AnswerRe: Version check Pin
Dave Kreskowiak15-Feb-09 4:39
mveDave Kreskowiak15-Feb-09 4:39 
GeneralRe: Version check Pin
JR21215-Feb-09 19:39
JR21215-Feb-09 19:39 
GeneralRe: Version check Pin
Dave Kreskowiak16-Feb-09 2:13
mveDave Kreskowiak16-Feb-09 2:13 
QuestionI need help with ADO.NET Pin
fiaolle14-Feb-09 10:53
fiaolle14-Feb-09 10:53 
AnswerRe: I need help with ADO.NET Pin
Calin Tatar14-Feb-09 13:18
Calin Tatar14-Feb-09 13:18 
GeneralRe: I need help with ADO.NET Pin
fiaolle15-Feb-09 1:22
fiaolle15-Feb-09 1:22 
AnswerRe: I need help with ADO.NET Pin
Dave Kreskowiak15-Feb-09 4:36
mveDave Kreskowiak15-Feb-09 4:36 
GeneralRe: I need help with ADO.NET Pin
fiaolle15-Feb-09 8:10
fiaolle15-Feb-09 8:10 
GeneralRe: I need help with ADO.NET Pin
Dave Kreskowiak15-Feb-09 10:07
mveDave Kreskowiak15-Feb-09 10:07 
GeneralRe: I need help with ADO.NET Pin
fiaolle15-Feb-09 10:19
fiaolle15-Feb-09 10:19 
GeneralRe: I need help with ADO.NET Pin
Dave Kreskowiak15-Feb-09 18:03
mveDave Kreskowiak15-Feb-09 18:03 
GeneralRe: I need help with ADO.NET Pin
fiaolle15-Feb-09 20:52
fiaolle15-Feb-09 20:52 
GeneralRe: I need help with ADO.NET Pin
Dave Kreskowiak16-Feb-09 2:15
mveDave Kreskowiak16-Feb-09 2:15 
GeneralRe: I need help with ADO.NET Pin
fiaolle16-Feb-09 5:25
fiaolle16-Feb-09 5:25 
GeneralRe: I need help with ADO.NET Pin
Dave Kreskowiak16-Feb-09 13:52
mveDave Kreskowiak16-Feb-09 13:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.