473,520 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stupidly dumb question...

Hello,
Just getting to grips with the .net side of things.
I have a login screen on my app, but I can't get my "login" button to be
default.

In old VB I could set focus to the username box so the user can type
straight in and tab to password then hit enter, but I don't see a "default"
property on command buttons any more, so the user then has to tab to the
button before hitting enter.

Any clues? I'm sure it's simple I just don't see it!
James
Nov 23 '05 #1
4 956
Hi,

Take a look at the forms acceptbutton property.
http://msdn.microsoft.com/library/de...uttontopic.asp

Ken
--------------
"JamesB" <james@MindTheSpam_puffle.co.uk> wrote in message
news:43***********************@news.zen.co.uk...
Hello,
Just getting to grips with the .net side of things.
I have a login screen on my app, but I can't get my "login" button to be
default.

In old VB I could set focus to the username box so the user can type
straight in and tab to password then hit enter, but I don't see a
"default" property on command buttons any more, so the user then has to
tab to the button before hitting enter.

Any clues? I'm sure it's simple I just don't see it!
James

Nov 23 '05 #2

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Hi,

Take a look at the forms acceptbutton property.
http://msdn.microsoft.com/library/de...uttontopic.asp


That looks ideal, thanks.
Unfortunately it doesn't seem to work! I put this in my form load event:

Me.AcceptButton = cmdLogin

But nothing happens when I hit enter.
The button is located on a tab control but reading that page I dont think it
should cause a problem... I'll have a fiddle.
James.
Nov 23 '05 #3
"JamesB" <james@MindTheSpam_puffle.co.uk> schrieb:
Take a look at the forms acceptbutton property.
http://msdn.microsoft.com/library/de...uttontopic.asp


That looks ideal, thanks.
Unfortunately it doesn't seem to work! I put this in my form load event:

Me.AcceptButton = cmdLogin

But nothing happens when I hit enter.
The button is located on a tab control but reading that page I dont think
it should cause a problem... I'll have a fiddle.


I am not sure why this doesn't work, but note that you can assign the button
to the form's 'AcceptButton' property at design time.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #4

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uG*************@TK2MSFTNGP09.phx.gbl...
"JamesB" <james@MindTheSpam_puffle.co.uk> schrieb:
Take a look at the forms acceptbutton property.
http://msdn.microsoft.com/library/de...uttontopic.asp


That looks ideal, thanks.
Unfortunately it doesn't seem to work! I put this in my form load event:

Me.AcceptButton = cmdLogin

But nothing happens when I hit enter.
The button is located on a tab control but reading that page I dont think
it should cause a problem... I'll have a fiddle.


I am not sure why this doesn't work, but note that you can assign the
button to the form's 'AcceptButton' property at design time.


I fixed it - I had "causesvalidation" set on my password textbox so the
enter wasn't getting to the button.
Just spotted the property in the designer too thanks - dunno why I missed it
before.

Thanks to both of you.


Nov 23 '05 #5

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

Similar topics

16
2471
by: squash | last post by:
a dumb question i had on my mind: Say you have a dynamically created web page . Isn't it more secure to write it in php since a visitor will not be able to tell it is dynamically created? But if you write it in perl, you have to put it in your cgi-bin which automatically means it's a dynamically generated page? security by obscurity . Is...
15
2652
by: Good Man | last post by:
Hey there I have a dumb question.... Let's say i have a database full of 4000 people.... I select everything from the database by: $result = mysql_query("SELECT * FROM People");
3
1459
by: ed | last post by:
I've just started working with .Net, so appologize for what is probably a really dumb question. Did Windows XP originally come with the .Net framework installed, and if so which version? thanks in advance, ed
2
2260
by: InvisibleMan | last post by:
Hi, I feel a little dumb for asking this (considering im writing TSQL) but there doesn't seem to be any definitive answers on the search engines... Okay I understand that if you open the ADO connection that you close it with: adoCon.Close Set adoCon = Nothing
2
1290
by: TGF | last post by:
How do you copy a String type into a native char buffer? Dumb question, but not sure how to do it :( TGF
5
1540
by: Need Help | last post by:
This might be an extremely dumb question; I'm new to Visual C++, and am trying to use the simple Spooler API, OpenPrinter, but when I try to compile my source file, it says OpenPrinter is an undeclared identifier. Here's how I'm trying to use it HANDLE newPrinter = NULL BOOL op = OpenPrinter(ps09, &newPrinter, NULL) Now, as far as I'm...
10
2255
by: Edward | last post by:
I've just taken over maintaining a system from a colleague who has left. I find the following line in her code: Dim params(2) As SqlClient.SqlParameter params(0) = New SqlClient.SqlParameter("@UserName", pvstrUsername) params(1) = New SqlClient.SqlParameter("@Password", pvstrPassword) params(2) = New...
2
2217
by: Bill Nguyen | last post by:
I would like to add a new VB.NET project using the same folder being used by another project so that I can share several forms already creaded by the other project. However, .NET created a new folder using whatever project name I supplied. Is there a work around for this? Thanks Bill
6
282
by: Robert Dufour | last post by:
What is the meaning of the word marshal and unmarshal in plain english as applied to an exe file? Does it mean the application has started and ended? Thanks for any help, Happy new year, Bob
15
2026
by: Martin Maney | last post by:
To quote from zipfile.py (2.4 library): # Search the last END_BLOCK bytes of the file for the record signature. # The comment is appended to the ZIP file and has a 16 bit length. # So the comment may be up to 64K long. We limit the search for the # signature to a few Kbytes at the end of the file for efficiency. # also, the signature must...
0
7326
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...
0
7243
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7213
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5162
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...
0
4809
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3304
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...
0
3298
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1687
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
0
533
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...

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.