User Profile

Collapse

Profile Sidebar

Collapse
thesarg
thesarg
Last Activity: Oct 22 '18, 10:00 PM
Joined: Oct 19 '18
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thanks for the reply Luk3r. Unfortunately adding e.SuppressKeyPr ess = true; doesn't make a difference. I actually have that in the code already to suppress the beep that occurs on a non-multiline TextBox. What's odd about my problem is that if I use the keyboard to enter text into the TextBox, then press the Enter key, then it works - all of the text gets selected. But if I use a barcode reader to enter text into the TextBox (with an automatic Cr),...
    See more | Go to post

    Leave a comment:


  • thesarg
    started a topic TextBox.SelectAll() doesn't work - sometimes

    TextBox.SelectAll() doesn't work - sometimes

    Using VS2008, Windows Forms Application

    In a TextBox::KeyDow n event I check to see if the Enter Key has been pressed, and if so, I perform some action then attempt to select all of the text using SelectAll(), as follows:
    Code:
    private void SelectAllTextBox_KeyDown(object sender, KeyEventArgs e)
    {
        if (Keys.Enter == e.KeyCode)
        {
    	PerformSomeAction();
            SelectAllTextBox.SelectAll();
    ...
    See more | Go to post
No activity results to display
Show More
Working...