Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 disabling command button
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
cool dude




PostPosted: Sun Dec 25, 2005 12:19 pm   Post subject: disabling command button

hi is there any way to disable the command button to being chosen when the program runs. wat i mean by that is if u have a command button when the program executes and u press enter the command button will be chosen. i was just wondering if u can stop it without disabling the enabled property.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sun Dec 25, 2005 1:26 pm   Post subject: (No subject)

I suppose you could have a dummy button, and change the tab order
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
cool dude




PostPosted: Sun Dec 25, 2005 2:37 pm   Post subject: (No subject)

wat do u mean by a dummy button?
Tony




PostPosted: Sun Dec 25, 2005 4:00 pm   Post subject: (No subject)

just a button that does nothing... or another element that could have tab order assosiated with itself. This way nothing gets executed when user hits Enter, unless they Tab to the command button first.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
cool dude




PostPosted: Sun Dec 25, 2005 4:35 pm   Post subject: (No subject)

i'm not sure if this is wat u mean by a dummy button but i created two command buttons the first one does nothin and the second does something. since the first one does nothing and when i click on enter it does nothing so it works. Smile but the thing is i don't want the button that does nothing to show up on my form so when i set the visibility property to false then i have the same problem again when i press enter it chooses the button that does something. i'm not sure if i understood wat u meant about dummy buttons and might have gotton the wrong idea. please tell me if this is the right idea and how i could fix it if it is?
cool dude




PostPosted: Sun Dec 25, 2005 5:57 pm   Post subject: (No subject)

thanks for the help and i already figured it out. all i could have done was change the property of the button to a mouse click so it will only exectute if it was clicked on with a mouse. Smile
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: