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

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2007
Posts: 28
Reputation: nice_true is an unknown quantity at this point 
Solved Threads: 0
nice_true nice_true is offline Offline
Light Poster

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

 
0
  #1
Oct 16th, 2007
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,
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: Setting focus.............

 
0
  #2
Oct 16th, 2007
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.
Wayne

It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 82
Reputation: preetham.saroja is an unknown quantity at this point 
Solved Threads: 1
preetham.saroja's Avatar
preetham.saroja preetham.saroja is offline Offline
Junior Poster in Training

Re: Setting focus.............

 
0
  #3
Oct 18th, 2007
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,.....
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC