Welcome to Dream.In.Code
Become a VB Expert!

Join 137,233 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,799 people online right now. Registration is fast and FREE... Join Now!




Set Button Focus

 
Reply to this topicStart new topic

Set Button Focus

hemo
7 Feb, 2007 - 03:16 PM
Post #1

New D.I.C Head
*

Joined: 2 Jan, 2007
Posts: 23



Thanked: 1 times
My Contributions
I am trying to set the click property of a button to offer the user the Enter Key as an alternative to clicking. I can achieve this by setting the button to Focus or Select, however, focus is lost to other objects. In VB6 the default property set to True work OK, but I can’t find a default option in vb2005.
Can anyone help?
Hemo

User is offlineProfile CardPM
+Quote Post

hemo
RE: Set Button Focus
8 Feb, 2007 - 08:08 AM
Post #2

New D.I.C Head
*

Joined: 2 Jan, 2007
Posts: 23



Thanked: 1 times
My Contributions
QUOTE(hemo @ 7 Feb, 2007 - 04:16 PM) *

I am trying to set the click property of a button to offer the user the Enter Key as an alternative to clicking. I can achieve this by setting the button to Focus or Select, however, focus is lost to other objects. In VB6 the default property set to True work OK, but I can’t find a default option in vb2005.
Can anyone help?
Hemo


User is offlineProfile CardPM
+Quote Post

hemo
RE: Set Button Focus
8 Feb, 2007 - 08:16 AM
Post #3

New D.I.C Head
*

Joined: 2 Jan, 2007
Posts: 23



Thanked: 1 times
My Contributions
QUOTE(hemo @ 7 Feb, 2007 - 04:16 PM) *

I am trying to set the click property of a button to offer the user the Enter Key as an alternative to clicking. I can achieve this by setting the button to Focus or Select, however, focus is lost to other objects. In VB6 the default property set to True work OK, but I can’t find a default option in vb2005.
Can anyone help?
Hemo


I have solved the problem, It's the AcceptButton property of the Form. i.e. Me.AcceptButton = Button1 or.......

Hope this helps others
hemo

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/4/08 03:35PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month