PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
Where is the "default" property of the Command Button Object in VB.net
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
Where is the "default" property of the Command Button Object in VB.net
![]() |
Where is the "default" property of the Command Button Object in VB.net |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
On 23 Aug 2006 18:30:48 -0700, simonoficina@gmail.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 (VB2005) That behavior is now limited to one or two buttons on any given form. Look at the form's properties "AcceptButton" and "CancelButton". If a button exists on a form it can be assigned as the "AcceptButton", and, likewise for a "CancelButton". Gene |
|
|
|
#3 |
|
Guest
Posts: n/a
|
simonoficina@gmail.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 |
|
|
|
#4 |
|
Guest
Posts: n/a
|
"Tom Shelton" <tom@mtogden.com> wrote in message
news:1156390551.198709.120840@m79g2000cwm.googlegroups.com... > > simonoficina@gmail.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 |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Tom Shelton wrote: > simonoficina@gmail.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 Boy did I misread the your post... Sorry ![]() -- Tom Shelton |
|
|
|
#6 |
|
Guest
Posts: n/a
|
We are in the 21st century, 25 years after the first PC and people still
want a Keyboard enter instead of a pointing device click or whatever. Amazing. Are there still people out there using only a 16" floppy disk? This is what I had to think about reading the OP's question. And surely not out of the topic. Cor <simonoficina@gmail.com> schreef in bericht news:1156383048.699466.66820@74g2000cwt.googlegroups.com... > 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 > |
|
|
|
#7 |
|
Guest
Posts: n/a
|
Sometimes your application may require typing some text into a field. A
simple press of the Enter key would then run the application rather than taking your hand off the keyboard and putting it on the mouse and then clicking a button. The keyboard Enter and the Mouse pointing device will run the same default button code so you can choose EITHER not 'one INSTEAD of the other'. Cheers. "Cor Ligthert [MVP]" <notmyfirstname@planet.nl> wrote in message news:uHPBxP0xGHA.1256@TK2MSFTNGP04.phx.gbl... > We are in the 21st century, 25 years after the first PC and people still > want a Keyboard enter instead of a pointing device click or whatever. > > Amazing. > > Are there still people out there using only a 16" floppy disk? > > This is what I had to think about reading the OP's question. > And surely not out of the topic. > > Cor > > <simonoficina@gmail.com> schreef in bericht > news:1156383048.699466.66820@74g2000cwt.googlegroups.com... >> 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 >> > > |
|
|
|
#8 |
|
Guest
Posts: n/a
|
Greg,
I thought that it was the default behaviour of a webbrowser, you don't mind that I say that I don't like it I am in the middle of a text, want to go to a new line or tab or whatever but my text is send. :-) Cor "Greg" <Greg@no-reply.ok> schreef in bericht news:ecjgmm$d43$1@mws-stat-syd.cdn.telstra.com.au... > Sometimes your application may require typing some text into a field. A > simple press of the Enter key would then run the application rather than > taking your hand off the keyboard and putting it on the mouse and then > clicking a button. The keyboard Enter and the Mouse pointing device will > run the same default button code so you can choose EITHER not 'one INSTEAD > of the other'. > > Cheers. > > "Cor Ligthert [MVP]" <notmyfirstname@planet.nl> wrote in message > news:uHPBxP0xGHA.1256@TK2MSFTNGP04.phx.gbl... >> We are in the 21st century, 25 years after the first PC and people still >> want a Keyboard enter instead of a pointing device click or whatever. >> >> Amazing. >> >> Are there still people out there using only a 16" floppy disk? >> >> This is what I had to think about reading the OP's question. >> And surely not out of the topic. >> >> Cor >> >> <simonoficina@gmail.com> schreef in bericht >> news:1156383048.699466.66820@74g2000cwt.googlegroups.com... >>> 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 >>> >> >> > > |
|
|
|
#9 |
|
Guest
Posts: n/a
|
"Cor Ligthert [MVP]" <notmyfirstname@planet.nl> schrieb:
> We are in the 21st century, 25 years after the first PC and people still > want a Keyboard enter instead of a pointing device click or whatever. > > Amazing. Huh?! I believe I am not the only one who is using the keyboard extensively to enter data and click buttons... -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> |
|
|
|
#10 |
|
Guest
Posts: n/a
|
>
> 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 |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 


