Click here to Skip to main content
15,892,643 members
Home / Discussions / Windows Forms
   

Windows Forms

 
AnswerRe: How to mount any file? Pin
Christian Graus12-Nov-07 20:03
protectorChristian Graus12-Nov-07 20:03 
QuestionHelp!!!!!! TableAdapter Or BindingSource ? Pin
saltcode12-Nov-07 9:23
professionalsaltcode12-Nov-07 9:23 
QuestionDocking a window Pin
erarocks11-Nov-07 21:12
erarocks11-Nov-07 21:12 
AnswerRe: Docking a window Pin
Rajasekharan Vengalil12-Nov-07 19:47
Rajasekharan Vengalil12-Nov-07 19:47 
GeneralRe: Docking a window Pin
LongRange.Shooter1-Feb-08 10:21
LongRange.Shooter1-Feb-08 10:21 
QuestionSimple Invoice Capture: To databind or not to databind? Pin
Brady Kelly10-Nov-07 21:09
Brady Kelly10-Nov-07 21:09 
AnswerRe: Simple Invoice Capture: To databind or not to databind? Pin
Rajasekharan Vengalil12-Nov-07 19:46
Rajasekharan Vengalil12-Nov-07 19:46 
GeneralChecking for a Key Sequence Pin
Brady Kelly10-Nov-07 3:51
Brady Kelly10-Nov-07 3:51 
I'm trying to monitor keypresses for a sequence that indicates the characters following the sequence belong in my BarCode control, so when the sequence is detected, that Control receives focus. How do I maintain a fixed length buffer of key presses, compared to the following code. My buffer should only be as long as the sequence I'm looking for, but I don't know how to shift the incoming key presses through the buffer.

private readonly string SCAN_START_SEQ = new string(new char[] { (char)2 });
private StringBuilder keyBuffer = new StringBuilder();

private void ScannerInputForm_KeyPress(object sender, KeyPressEventArgs e)
{
    keyBuffer.Append(e.KeyChar);
    string buff = keyBuffer.ToString();
    if (buff.EndsWith(SCAN_START_SEQ))
    {
        keyBuffer.Remove(0, keyBuffer.Length);
        e.Handled = true;
        textBarCode.Focus();
    }
}


MY BLOG


Calling all South African developers! Your participation in this local dev community will be mutually beneficial, to you and us.

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 
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 

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.