By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Command1.Default = True

P: n/a
What happened to this very simple VB6 command?

I am trying to make a button in a .net App the Default and I cannot get it
to work,

Why is this so Difficult,

RY
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
* "=?Utf-8?B?UmFuZHkgWW9yaw==?=" <Randy Yo**@discussions.microsoft.com> scripsit:
What happened to this very simple VB6 command?

I am trying to make a button in a .net App the Default and I cannot get it
to work,


Assign the button to the form's 'AcceptButton' property.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2

P: n/a
I Added the Button,

then

added this line to the Form Load Code.

VB6.SetDefault(Button1, True)
i still get the error...

I hate .net

"Herfried K. Wagner [MVP]" wrote:
* "=?Utf-8?B?UmFuZHkgWW9yaw==?=" <Randy Yo**@discussions.microsoft.com> scripsit:
What happened to this very simple VB6 command?

I am trying to make a button in a .net App the Default and I cannot get it
to work,


Assign the button to the form's 'AcceptButton' property.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3

P: n/a
* "=?Utf-8?B?UmFuZHkgWW9yaw==?=" <Ra*******@discussions.microsoft.com> scripsit:
I Added the Button,

then

added this line to the Form Load Code.

VB6.SetDefault(Button1, True)
i still get the error...


What error?

Did you miss what I said?
Assign the button to the form's 'AcceptButton' property.


Open the form in the Windows Forms designer and simply assign the button
to the form's 'AcceptButton' property. This will be equivalent to
setting a button's 'Default' property to 'True' in VB6.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.