473,763 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Where is the "default" property of the Command Button Object in VB.net

Hello all! I am a vb.net beginner in Spain. When I use VB6 ,the button
object has a property called "default" that can set this button like
press "ENTER" key. But in the VB.net I can't find this property. Where
is it? Or mabye change the other thing,No?Thanks ! Simon

Aug 24 '06
15 12547

Greg wrote:
"Tom Shelton" <to*@mtogden.co mwrote in message
news:11******** **************@ m79g2000cwm.goo glegroups.com.. .

si**********@gm ail.com wrote:
Hello all! I am a vb.net beginner in Spain. When I use VB6 ,the button
object has a property called "default" that can set this button like
press "ENTER" key. But in the VB.net I can't find this property. Where
is it? Or mabye change the other thing,No?Thanks ! Simon
For the most part, the concept of a "default" property has gone away.
In VB.NET, only an indexed property can be marked as default using an
attribute. Which, IMHO, is a very good thing. I always was one of
those wackos that thought the use of default properties were evil....
You can mark declare a default property using the default keyword.

--
Tom Shelton

Actually, the functionality is still there in VB.NET, but it has been moved
to the form itself.
Now every form "has a" default button property, whereby a button object can
be assigned to this property of the form.
In the form's properties go to the AcceptButton and CancelButton and choose
the required button from the dropdown lists.

Cheers,
Greg
Greg,

I realize that, I thought the OP was talking about default properties
like they existed in VB6 - you know:

Text1 = "Hello, World"

Where you didn't have to specify that it was really Text1.Text. It was
a simple misreading of the OP's post.

--
Tom Shelton

Aug 24 '06 #11
>Huh?! I believe I am not the only one who is using the keyboard
>extensively to enter data and click buttons...
What is it, to enter data or to automaticly click *one* buttons

Cor
It makes about as much sense as "clicking" a button by pressing the space
bar (when the button is highlighted).

Personally, I got started with heavy data input using the 10 key entry. If
it is an accounting system, or something that heavily uses numbers, it is
a pain to need to keep the left hand available for the tab key when it could
easily be flowing down a printed page keeping track of which line to enter.
(Ah the days of entering pages of hex codes from Compute! magazines...) Touch
typists can fly through a form much faster using the enter key to move between
fields than having to reach for the mouse all the time.
Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx
Aug 24 '06 #12
The Default and Cancel properties have been removed from the Command
Button object, and have been implemented at the Form level. There is
an AcceptButton and CancelButton property on the Form object that
serves as the replacement.
Jim Wooley wrote:
Huh?! I believe I am not the only one who is using the keyboard
extensively to enter data and click buttons...
What is it, to enter data or to automaticly click *one* buttons

Cor

It makes about as much sense as "clicking" a button by pressing the space
bar (when the button is highlighted).

Personally, I got started with heavy data input using the 10 key entry. If
it is an accounting system, or something that heavily uses numbers, it is
a pain to need to keep the left hand available for the tab key when it could
easily be flowing down a printed page keeping track of which line to enter.
(Ah the days of entering pages of hex codes from Compute! magazines...) Touch
typists can fly through a form much faster using the enter key to move between
fields than having to reach for the mouse all the time.
Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx
Aug 24 '06 #13
"Tom Shelton" <to*@mtogden.co mwrote in message
news:11******** *************@i 3g2000cwc.googl egroups.com...
>
Greg wrote:
>"Tom Shelton" <to*@mtogden.co mwrote in message
news:11******* *************** @m79g2000cwm.go oglegroups.com. ..
>
si**********@gm ail.com wrote:
Hello all! I am a vb.net beginner in Spain. When I use VB6 ,the button
object has a property called "default" that can set this button like
press "ENTER" key. But in the VB.net I can't find this property. Where
is it? Or mabye change the other thing,No?Thanks ! Simon

For the most part, the concept of a "default" property has gone away.
In VB.NET, only an indexed property can be marked as default using an
attribute. Which, IMHO, is a very good thing. I always was one of
those wackos that thought the use of default properties were evil....
You can mark declare a default property using the default keyword.

--
Tom Shelton

Actually, the functionality is still there in VB.NET, but it has been
moved
to the form itself.
Now every form "has a" default button property, whereby a button object
can
be assigned to this property of the form.
In the form's properties go to the AcceptButton and CancelButton and
choose
the required button from the dropdown lists.

Cheers,
Greg

Greg,

I realize that, I thought the OP was talking about default properties
like they existed in VB6 - you know:

Text1 = "Hello, World"

Where you didn't have to specify that it was really Text1.Text. It was
a simple misreading of the OP's post.

--
Tom Shelton
G'day Tom,

As the OP was talking about VB6, buttons and Enter as a default, I assumed
he meant how you could make the button default to an enter or esc press
which is now handled in VB.NET at the form level. LOL. Now I'm not even sure
what the OP was talking about :)

Cheers mate,
Greg.
Aug 25 '06 #14

Greg wrote:
"Tom Shelton" <to*@mtogden.co mwrote in message
news:11******** *************@i 3g2000cwc.googl egroups.com...

Greg wrote:
"Tom Shelton" <to*@mtogden.co mwrote in message
news:11******** **************@ m79g2000cwm.goo glegroups.com.. .

si**********@gm ail.com wrote:
Hello all! I am a vb.net beginner in Spain. When I use VB6 ,the button
object has a property called "default" that can set this button like
press "ENTER" key. But in the VB.net I can't find this property. Where
is it? Or mabye change the other thing,No?Thanks ! Simon

For the most part, the concept of a "default" property has gone away.
In VB.NET, only an indexed property can be marked as default using an
attribute. Which, IMHO, is a very good thing. I always was one of
those wackos that thought the use of default properties were evil....
You can mark declare a default property using the default keyword.

--
Tom Shelton

Actually, the functionality is still there in VB.NET, but it has been
moved
to the form itself.
Now every form "has a" default button property, whereby a button object
can
be assigned to this property of the form.
In the form's properties go to the AcceptButton and CancelButton and
choose
the required button from the dropdown lists.

Cheers,
Greg
Greg,

I realize that, I thought the OP was talking about default properties
like they existed in VB6 - you know:

Text1 = "Hello, World"

Where you didn't have to specify that it was really Text1.Text. It was
a simple misreading of the OP's post.

--
Tom Shelton

G'day Tom,

As the OP was talking about VB6, buttons and Enter as a default, I assumed
he meant how you could make the button default to an enter or esc press
which is now handled in VB.NET at the form level. LOL. Now I'm not even sure
what the OP was talking about :)

Cheers mate,
Greg.
I think were right about it :)

--
Tom Shelton

Aug 25 '06 #15
Jim,

I agree if you have selected that button, but on the other hand, do I not
like those programs anymore that if I think to do a really enter. That enter
is in my idea still from terminals as the VT100 (Unix Terminals) or the 3270
on IBM mainframe, which sends a full screen.

Cor

"Jim Wooley" <ji************ *@hotmail.comsc hreef in bericht
news:24******** *************** **@msnews.micro soft.com...
>>Huh?! I believe I am not the only one who is using the keyboard
extensively to enter data and click buttons...
What is it, to enter data or to automaticly click *one* buttons

Cor

It makes about as much sense as "clicking" a button by pressing the space
bar (when the button is highlighted).
Personally, I got started with heavy data input using the 10 key entry. If
it is an accounting system, or something that heavily uses numbers, it is
a pain to need to keep the left hand available for the tab key when it
could easily be flowing down a printed page keeping track of which line to
enter. (Ah the days of entering pages of hex codes from Compute!
magazines...) Touch typists can fly through a form much faster using the
enter key to move between fields than having to reach for the mouse all
the time. Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx


Aug 25 '06 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
4952
by: Stefano | last post by:
Hi all, what is the correct use of the "default" attribute in XML Schema? For example: <xs:element name="myProperty" type="xs:string" default="myDefaultValue"/> What can I do with it? What is the meaning of < ....default="myDefaultValue" /> ?
3
5574
by: C# Learner | last post by:
Is it possible to set a command button to the "default" button of the form? Here's an example of what I mean -- press Start -> Run. Notice that the "OK" button has a dark rectangle around it, and when you press ENTER, this "OK" button's Click event handler is eventually fired. I was expecting Button to have a Default property, but can't seem to find anything like it...
5
3914
by: Hendrik Schober | last post by:
Hi, we just run into the problem, that "default" alignment in the project properies dialog seem to be different. We have a project that's a DLL, which is linked with a couple of LIBs. All are with the same solution. All had "Default" set in the "Struct Member Alignment" entry. After some assembler debugging we found out that a struct member that is a member function pointer in
6
8226
by: Paul Turley | last post by:
Does anyone have some sample script to "press" a button or image button when the user presses the Enter key? I see this behavior on a lot of web pages but I'm not finding any samples. Thx -- Paul Turley, MCSD, MCAD, MCT, MSF Practitioner, A+ Technician paul@createsolutions.net
3
2903
by: per9000 | last post by:
Hi, can I print some default text on the console when doing a ReadLine? A silly example below shows two small scenarios. In the first a user is told what he appears to be called, and asks for a name. In the second case I want the the user to be able to just press return to accept the username of the system. (I understand it does not work the way I do it below - I just want to illustrate what I want).
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10145
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9998
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9822
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5270
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
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 we have to send another system
3
2793
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.