Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regaing focus of textbox 1

Status
Not open for further replies.

696796

Programmer
Joined
Aug 3, 2004
Messages
218
Location
GB
ok, to make my delete button work, i need to regain the focus of the last text box that had text entered into it.

Still with me? i'll go on...
The focus is lost as buttons are pressed on the form which fill the textbox. this is as i have a touchscreen application and i have buttons onthe forms to replicate a keyboard - i just need the delete one to work.

So does anybody know how to regain the focus lost as ive clicked these buttons?

If not can i click on the field to be edited, then with a different delete, backspace as a keyboard delete key would work.

Any ideas on how to tackle this would be great stuff

[peace]
 
>...then with a different delete, backspace as a keyboard >delete key would work.

Look up SendKeys in the help file. You should be able to setfocus to the control and use: SendKeys "{BACKSPACE}"

..or something like that. The exact syntax will be in the help file sample.

Mike
 
Thanks micky, just done that, works a treat
 
Hi again, just wondered if you knew how to replicate the spacebar using the sendkey function. I've looked in the help file and it doesn't list it!

cheers
 
My mistake. That doesn't work but you can use:

SendKeys (Chr(32))

By the way, I gave a complete solution to this in your other post on the same topic. A bit messy though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top