Welcome to Dream.In.Code
Getting C# Help is Easy!

Join 105,777 C# Programmers for FREE! Ask your question and get quick answers from experts. There are 1,228 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



change the default cursor focus to point to button

 
Reply to this topicStart new topic

change the default cursor focus to point to button

turtleC++
post 14 Jul, 2008 - 09:55 PM
Post #1


New D.I.C Head

*
Joined: 7 May, 2008
Posts: 41

I have two radio buttons and command button, but when my form is executed the cursor position is in the radio button, so how can I move that cursor position to command button instead?
User is offlineProfile CardPM

Go to the top of the page


jayman9
post 15 Jul, 2008 - 08:32 AM
Post #2


Student of Life

Group Icon
Joined: 26 Dec, 2005
Posts: 6,241



Thanked 21 times

Dream Kudos: 500

Expert In: C#, VB.NET, Java

My Contributions


Give it focus.

CODE
<button name>.Focus();
User is offlineProfile CardPM

Go to the top of the page

turtleC++
post 15 Jul, 2008 - 09:34 AM
Post #3


New D.I.C Head

*
Joined: 7 May, 2008
Posts: 41

QUOTE(jayman9 @ 15 Jul, 2008 - 08:32 AM) *

Give it focus.

CODE
<button name>.Focus();


thanks I tried it, but it doesn't work. Where would I put Focus()? I put in the constructure, but it doesn't work. From google, people use TabStop under the property, but I have so many window dialogs added into my project, so going through all these buttons are not efficient.

This post has been edited by turtleC++: 15 Jul, 2008 - 10:07 AM
User is offlineProfile CardPM

Go to the top of the page

eclipsed4utoo
post 15 Jul, 2008 - 11:07 AM
Post #4


D.I.C Head

**
Joined: 21 Mar, 2008
Posts: 88



Thanked 4 times
My Contributions


CODE

this.ActiveControl = button1; //name of your button
User is offlineProfile CardPM

Go to the top of the page

turtleC++
post 15 Jul, 2008 - 11:39 AM
Post #5


New D.I.C Head

*
Joined: 7 May, 2008
Posts: 41

It's working, thanks eclipsed4utoo.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/21/08 04:24PM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month