Click here to Skip to main content
15,884,099 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralChecking for a Key Sequence Pin
Brady Kelly10-Nov-07 3:51
Brady Kelly10-Nov-07 3:51 
GeneralRe: Checking for a Key Sequence Pin
Trollslayer10-Nov-07 5:28
mentorTrollslayer10-Nov-07 5:28 
GeneralRe: Checking for a Key Sequence Pin
Brady Kelly10-Nov-07 5:36
Brady Kelly10-Nov-07 5:36 
GeneralRe: Checking for a Key Sequence Pin
Trollslayer10-Nov-07 5:55
mentorTrollslayer10-Nov-07 5:55 
GeneralRe: Checking for a Key Sequence Pin
Brady Kelly10-Nov-07 6:04
Brady Kelly10-Nov-07 6:04 
GeneralRe: Checking for a Key Sequence Pin
Trollslayer10-Nov-07 6:28
mentorTrollslayer10-Nov-07 6:28 
GeneralRe: Checking for a Key Sequence Pin
Brady Kelly10-Nov-07 19:48
Brady Kelly10-Nov-07 19:48 
GeneralRe: Checking for a Key Sequence Pin
Luc Pattyn10-Nov-07 14:24
sitebuilderLuc Pattyn10-Nov-07 14:24 
Hi Brady,

if you want to recognize a specific string (SEQ) the only thing you need
is a buffer of length SEQ.Length; since you need the string value for every
character you append, it is not useful to have a StringBuilder.

Hence use a string (say buf, initialized at "") and do:
buf=buf+e.KeyChar;
if (buf.Length>SEQ.Length) buf=buf.SubString(buf.Length-SEQ.Length, SEQ.Length);
if (buf.Equals(SEQ)) ...


Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]


this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google


GeneralRe: Checking for a Key Sequence Pin
Brady Kelly10-Nov-07 19:53
Brady Kelly10-Nov-07 19:53 
GeneralRe: Checking for a Key Sequence Pin
Luc Pattyn11-Nov-07 3:34
sitebuilderLuc Pattyn11-Nov-07 3:34 
GeneralRe: Checking for a Key Sequence Pin
Brady Kelly11-Nov-07 3:39
Brady Kelly11-Nov-07 3:39 
QuestionMater / Detail Datagridview Pin
Mr. Candyman7-Nov-07 8:41
Mr. Candyman7-Nov-07 8:41 
AnswerRe: Mater / Detail Datagridview Pin
led mike7-Nov-07 8:46
led mike7-Nov-07 8:46 
GeneralRe: Mater / Detail Datagridview Pin
Mr. Candyman7-Nov-07 9:40
Mr. Candyman7-Nov-07 9:40 
GeneralRe: Mater / Detail Datagridview Pin
led mike7-Nov-07 10:41
led mike7-Nov-07 10:41 
GeneralRe: Mater / Detail Datagridview Pin
Mr. Candyman7-Nov-07 11:28
Mr. Candyman7-Nov-07 11:28 
Questionexpanding label control Pin
abdelhameed817-Nov-07 0:37
abdelhameed817-Nov-07 0:37 
AnswerRe: expanding label control Pin
Christian Graus7-Nov-07 9:43
protectorChristian Graus7-Nov-07 9:43 
QuestionDataGridView and Generics Pin
Ponzano Paolo5-Nov-07 23:44
Ponzano Paolo5-Nov-07 23:44 
AnswerRe: DataGridView and Generics Pin
Christian Graus5-Nov-07 23:53
protectorChristian Graus5-Nov-07 23:53 
GeneralRe: DataGridView and Generics Pin
Ponzano Paolo6-Nov-07 0:29
Ponzano Paolo6-Nov-07 0:29 
GeneralRe: DataGridView and Generics Pin
Pete O'Hanlon6-Nov-07 1:11
mvePete O'Hanlon6-Nov-07 1:11 
GeneralRe: DataGridView and Generics Pin
Ponzano Paolo6-Nov-07 1:13
Ponzano Paolo6-Nov-07 1:13 
GeneralRe: DataGridView and Generics Pin
Ponzano Paolo6-Nov-07 1:34
Ponzano Paolo6-Nov-07 1:34 
QuestionC# Soap and HTTP Pin
AssemblySoft5-Nov-07 6:16
AssemblySoft5-Nov-07 6:16 

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.