473,503 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Command1.Default = True

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
3 3573
* "=?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
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
* "=?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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
10265
by: SPG | last post by:
Hi, I am relatively new to TOMCAT, and am trying to deploy a web app using it. I have a domain name that I want to use to access my web app directly. By default, I deploy my WAR, and it deploys...
1
289
by: nick | last post by:
Hi What is the proper way of setting a boolean column (checkbox) to "true" by default? It seems that the datagrid won't accept inserts if the default is true. BoolColPaid = new...
18
2970
by: Matt | last post by:
I try to compare the default constructor in Java and C++. In C++, a default constructor has one of the two meansings 1) a constructor has ZERO parameter Student() { //etc... } 2) a...
2
2304
by: Goober | last post by:
I have the following default.aspx page that works properly. However, what I want to do is to link the graphics within it (that are hard coded now in the default web page) to our corporate...
5
3558
by: Juan T. Llibre | last post by:
OK, guys, usually I answer questions instead of asking them, but this thing has me scratching my head. Why is the default for AutoEventWireup different for C# and VB.NET ? In VS 2005, if I...
7
11463
by: tlyczko | last post by:
I have a char(11) for SSN, and I would like to default it to 123-45-6789 so I can avoid having nulls in this column, and so I can easily find the rows in which I need to have a 'correct' SSN...
74
15868
by: Zytan | last post by:
I have a struct constructor to initialize all of my private (or public readonly) fields. There still exists the default constructor that sets them all to zero. Is there a way to remove the...
11
4659
by: Dominic Vella | last post by:
I am using MS-Access2000. I can't seem to set the default values for Logical type fields. I start with Dim dbsTmp As Object ' I think it's DAO.Database Set dbsTmp =...
6
1928
tpgames
by: tpgames | last post by:
I'm trying to get a maze to default to always giving me the image as the marker and never give me the color as the marker. The code requires you to check a box to get the image marker to be used. So,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7011
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5596
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4689
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.