Visual Studio code help

260 pts.
Tags:
C#
C# .NET
Visual Studio 2005
VS 2005
here is my code:
private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Tab && e.Shift) 
            {
            }
            else if (e.KeyCode == Keys.Back) 
            {
                SendKeys.Send("+{tab}");
            }
        }
I have done it almost but there is little problem is that it's delete last characters in object like textbox and setfocus to previous textbox.
I don't won't to delete any character within object and move to previous object. as usual Shift+Tab does.


Software/Hardware used:
C#, VS-2005

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    Maheshwag, why don't you tell us what is exactly what you are trying to do ? what exactly is this code supposed to do ? And, please, provide enough details.
    70,200 pointsBadges:
    report
  • Maheshwag
    The above code is for convert Shift+Tab behavior to backspace See Shift+Tab Behavior is move to previous object from current without delete any character from it. if object is textbox1,textbox2. If my Cursor on textbox2 then when i press backspace it should move to textbox1 without deleting any single character/string from textbox2.
    260 pointsBadges:
    report
  • Maheshwag
    Here is the Solution For That :
    private void Form1_KeyDown(object sender, KeyEventArgs e)
    
            {
    
                if (e.KeyCode == Keys.Tab && e.Shift) 
    
                {
    
    
                }
    
    
                else if (e.KeyCode == Keys.Back) 
    
                {
    
                    SendKeys.Send("+{tab}");
                    e.suppresskeypress=true;
                }
    
            }
    
    I have found the solution for that and completed as above. Now Backspace completly behave like Shift+Tab Key.
    260 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following