954,136 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Setting focus.............

Hi!

can u plz tell me what is the code for setting the focus to a checkbox in vb.net 2003 project.
How is this possible?
I have tried checkbox1.setfocus=true but itdoes not work.


Secondly, I wish to fire the click event for a button when I press the enter key. How is this possible? What properties do I need to set?


Thanks,

nice_true
Light Poster
28 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

Me.CheckBox1.Focus()
In your forms property find AcceptButton and set it to the button you want the enter key to press. You can also set the CancelButton to press if you hit the Esc key.

waynespangler
Posting Pro in Training
461 posts since Dec 2002
Reputation Points: 84
Solved Threads: 58
 

try to use the javascript for setfocus& keypress...
Unless& untill u use js.its ain't possible to work on vs-2003 or 5,,,
if u want js-reply m back i will forward it to u,.....

preetham.saroja
Junior Poster in Training
82 posts since Jun 2007
Reputation Points: 5
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You