|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Where is the "default" property of the Command Button Object in VB.netHello 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 On 23 Aug 2006 18:30:48 -0700, simonofic***@gmail.com wrote:
>Hello all! I am a vb.net beginner in Spain. When I use VB6 ,the button (VB2005)>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 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 simonofic***@gmail.com wrote:
> Hello all! I am a vb.net beginner in Spain. When I use VB6 ,the button For the most part, the concept of a "default" property has gone away.> 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 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
Show quote
Hide quote
"Tom Shelton" <t**@mtogden.com> wrote in message Actually, the functionality is still there in VB.NET, but it has been moved news:1156390551.198709.120840@m79g2000cwm.googlegroups.com... > > simonofic***@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 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 wrote:
Show quoteHide quote > "Tom Shelton" <t**@mtogden.com> wrote in message Greg,> news:1156390551.198709.120840@m79g2000cwm.googlegroups.com... > > > > simonofic***@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 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
Show quote
Hide quote
"Tom Shelton" <t**@mtogden.com> wrote in message G'day Tom,news:1156425347.198968.81540@i3g2000cwc.googlegroups.com... > > Greg wrote: >> "Tom Shelton" <t**@mtogden.com> wrote in message >> news:1156390551.198709.120840@m79g2000cwm.googlegroups.com... >> > >> > simonofic***@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 > > 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 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. Greg wrote:
Show quoteHide quote > "Tom Shelton" <t**@mtogden.com> wrote in message I think were right about it :)> news:1156425347.198968.81540@i3g2000cwc.googlegroups.com... > > > > Greg wrote: > >> "Tom Shelton" <t**@mtogden.com> wrote in message > >> news:1156390551.198709.120840@m79g2000cwm.googlegroups.com... > >> > > >> > simonofic***@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 > > > > 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. -- Tom Shelton Tom Shelton wrote:
Show quoteHide quote > simonofic***@gmail.com wrote: Boy did I misread the your post... Sorry :)> > 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 -- Tom Shelton 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 <simonofic***@gmail.com> schreef in bericht Show quoteHide quote 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 > 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. Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@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 > > <simonofic***@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 >> > > 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. :-) CorShow quoteHide quote "Greg" <G***@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]" <notmyfirstn***@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 >> >> <simonofic***@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 >>> >> >> > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schrieb: Huh?! I believe I am not the only one who is using the keyboard extensively > 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. 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/> > What is it, to enter data or to automaticly click *one* buttons> Huh?! I believe I am not the only one who is using the keyboard > extensively to enter data and click buttons... > > -- :-) Cor>> Huh?! I believe I am not the only one who is using the keyboard It makes about as much sense as "clicking" a button by pressing the space >> extensively to enter data and click buttons... >> > What is it, to enter data or to automaticly click *one* buttons > > Cor > 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 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: Show quoteHide quote > >> 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 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 Show quoteHide quote "Jim Wooley" <jimNOSPAMwooley@hotmail.com> schreef in bericht news:24f81e8fc0e58c89579cd766225@msnews.microsoft.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 > >
Get text file content into SQL table
Array of a Class - Weird Output translating more stuff from C Search DataRow Array Converting VB6 Structures to .NET Problem using default xml namespace and selectsignlenode/selectnod Wireless Electronics/Cell Phones/GPS/Text Messaging need advices on Global Error Handling in VB.Net not null statement transaction isolation level |
|||||||||||||||||||||||