470,619 Members | 1,483 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,619 developers. It's quick & easy.

Set forcus for control in a form

I have a Form.control, a textbox in a form. Initially, the control has
forcus. However, after user click this control, I need to insert something
into the textbox, which caused the losing forcus of control, and obtaining
forcus for the textbox.

Is there a property or method I can use to keep the forcus in control? I
want to catch the KeyDown or KeyPress event for this control. However it is
not stopping at the breakpoint due to losing forcus.

Any solution is highly appreciated.
Sep 19 '06 #1
1 1118
Hello Gary,

use Focus/Select methods of your control

GI have a Form.control, a textbox in a form. Initially, the control
Ghas forcus. However, after user click this control, I need to insert
Gsomething into the textbox, which caused the losing forcus of
Gcontrol, and obtaining forcus for the textbox.
G>
GIs there a property or method I can use to keep the forcus in
Gcontrol? I want to catch the KeyDown or KeyPress event for this
Gcontrol. However it is not stopping at the breakpoint due to losing
Gforcus.
G>
GAny solution is highly appreciated.
G>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Sep 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by martin | last post: by
2 posts views Thread by John Lau | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.