sendkeys.send("{BS}")
-
I want to send this to a textbox but when i put it in a button_click It doesnt work. I need to link it to the textbox but i cant fingure it out. James Kennelly
-
I want to send this to a textbox but when i put it in a button_click It doesnt work. I need to link it to the textbox but i cant fingure it out. James Kennelly
You must give the focus to the control you want to send the keystrokes to. Using this method isn't recommended because it's not a completely reliable way to send keystrokes. In order for it to work, you must give the application/control the focus, then send the keystrokes. But, in a multitasking environment like Windows, the focus can move from control to control and application to application at any time. This includes the time between when you set the focus and the time you send the keystrokes, even if SendKeys is the very next statement! RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
You must give the focus to the control you want to send the keystrokes to. Using this method isn't recommended because it's not a completely reliable way to send keystrokes. In order for it to work, you must give the application/control the focus, then send the keystrokes. But, in a multitasking environment like Windows, the focus can move from control to control and application to application at any time. This includes the time between when you set the focus and the time you send the keystrokes, even if SendKeys is the very next statement! RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
well ginving the text box focus works i only need it for a second. But it wipes out the entire contents of the textbox because of the focus it selects all. so had to play a game and came up with TextBox1.Focus() SendKeys.Send("{right}") SendKeys.Send("{backspace}") works so I like it! James Kennelly
-
well ginving the text box focus works i only need it for a second. But it wipes out the entire contents of the textbox because of the focus it selects all. so had to play a game and came up with TextBox1.Focus() SendKeys.Send("{right}") SendKeys.Send("{backspace}") works so I like it! James Kennelly
vertig0730 wrote: well ginving the text box focus works i only need it for a second. That's what I thought too... until it hit production! Out of 15,000 machines, some are garanteed to find that little second and mess it up for you. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
vertig0730 wrote: well ginving the text box focus works i only need it for a second. That's what I thought too... until it hit production! Out of 15,000 machines, some are garanteed to find that little second and mess it up for you. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
good news I am only intstalling it on 1 machine so i like the odds. James Kennelly