Click here to Skip to main content
15,907,492 members
Home / Discussions / C#
   

C#

 
GeneralRe: GUID Conversion Pin
Nick Parker8-Feb-04 5:45
protectorNick Parker8-Feb-04 5:45 
GeneralCreating an instance of an object ... Pin
Andres Coder7-Feb-04 7:36
Andres Coder7-Feb-04 7:36 
GeneralRe: Creating an instance of an object ... Pin
Nick Parker7-Feb-04 7:56
protectorNick Parker7-Feb-04 7:56 
GeneralRe: Creating an instance of an object ... Pin
Charlie Williams7-Feb-04 8:26
Charlie Williams7-Feb-04 8:26 
GeneralRe: Creating an instance of an object ... Pin
John Kuhn7-Feb-04 8:34
John Kuhn7-Feb-04 8:34 
GeneralRe: Creating an instance of an object ... Pin
Heath Stewart7-Feb-04 19:23
protectorHeath Stewart7-Feb-04 19:23 
GeneralRe: Creating an instance of an object ... Pin
Andres Coder7-Feb-04 19:48
Andres Coder7-Feb-04 19:48 
GeneralRe: Creating an instance of an object ... Pin
Heath Stewart7-Feb-04 19:51
protectorHeath Stewart7-Feb-04 19:51 
GeneralDynamic attributes in datagrid. Pin
Andrlage7-Feb-04 3:05
Andrlage7-Feb-04 3:05 
GeneralRe: Dynamic attributes in datagrid. Pin
Mazdak7-Feb-04 3:46
Mazdak7-Feb-04 3:46 
GeneralRe: Dynamic attributes in datagrid. Pin
Bill Dean7-Feb-04 4:01
Bill Dean7-Feb-04 4:01 
GeneralHelp with MSComm serial port communications Pin
maria_p6-Feb-04 19:37
maria_p6-Feb-04 19:37 
GeneralConversion From VB Pin
Josh Koppang6-Feb-04 17:42
Josh Koppang6-Feb-04 17:42 
GeneralRe: Conversion From VB Pin
Bill Dean6-Feb-04 18:12
Bill Dean6-Feb-04 18:12 
Questionis their any way to ..................? Pin
6-Feb-04 13:27
suss6-Feb-04 13:27 
AnswerRe: is their any way to ..................? Pin
Colin Angus Mackay7-Feb-04 3:05
Colin Angus Mackay7-Feb-04 3:05 
AnswerRe: is their any way to ..................? Pin
Heath Stewart7-Feb-04 19:28
protectorHeath Stewart7-Feb-04 19:28 
AnswerRe: is their any way to ..................? Pin
13-Feb-04 6:39
suss13-Feb-04 6:39 
GeneralIncrementally create user controls Pin
Andrlage6-Feb-04 12:16
Andrlage6-Feb-04 12:16 
GeneralRe: Incrementally create user controls Pin
Colin Angus Mackay7-Feb-04 3:13
Colin Angus Mackay7-Feb-04 3:13 
GeneralRe: Incrementally create user controls Pin
Andres Coder7-Feb-04 7:41
Andres Coder7-Feb-04 7:41 
GeneralRe: Incrementally create user controls Pin
Andres Coder7-Feb-04 7:42
Andres Coder7-Feb-04 7:42 
Generalenter Pin
heba_zien6-Feb-04 11:14
heba_zien6-Feb-04 11:14 
GeneralRe: enter Pin
Bill Dean6-Feb-04 17:01
Bill Dean6-Feb-04 17:01 
Hi,

The Form has an "AcceptButton" property that will do let you this.

Viewing the form in Design mode, look at the properties window. The AcceptButton property will have a list of all the buttons on the form. Pick you one you want.

Or you can set it in code:
<br />
Button MyButton=new Button();<br />
...<br />
Form.AcceptButton=MyButton<br />



According to the Help: "You can use this property to allow the user to quickly navigate a simple form by allowing them to simply press the ENTER key when they are finished instead of manually clicking the accept button with their mouse."

In a nutshell, when the user hits enter, the Click event on the specified button is fired.


Hope this helps,
Bill

ps: there is a CancelButton property that sets a default button for ESC.
QuestionIs implementing WH_KEYBOARD hooking in a .NET library a good idea? Pin
Anonymous6-Feb-04 10:34
Anonymous6-Feb-04 10:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.