473,471 Members | 1,898 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

simple textbox question

If I have an application which has 1 form and that form
has 1 textbox. How can I make the cursor appear in the
textbox when the form loads? So a user can just start
typing and doesn't have to click on the textbox first.
Thanks for the reply.

Mike
Nov 15 '05 #1
3 1046
Set the TabIndex of the control to 0

"Mike" <mi*******@hotmail.com> wrote in message
news:01****************************@phx.gbl...
If I have an application which has 1 form and that form
has 1 textbox. How can I make the cursor appear in the
textbox when the form loads? So a user can just start
typing and doesn't have to click on the textbox first.
Thanks for the reply.

Mike

Nov 15 '05 #2
I tried doing that but if I have a button on my form,
then that button gets focus even if the textbox has a
TabIndex of 0 and the button has a TabIndex of 1.
-----Original Message-----
Set the TabIndex of the control to 0

"Mike" <mi*******@hotmail.com> wrote in message
news:01****************************@phx.gbl...
If I have an application which has 1 form and that form
has 1 textbox. How can I make the cursor appear in the
textbox when the form loads? So a user can just start
typing and doesn't have to click on the textbox first.
Thanks for the reply.

Mike

.

Nov 15 '05 #3
If your texbox is inside a groupbox or panel, make sure it also has index 0

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #4

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

Similar topics

10
by: Oli | last post by:
Hi Folks, Alright, I have a textbox called "A" and the value in that textbox is "B". When the user presses submit I want A : B to appear on the page. How do I do it? I appreciate that this...
3
by: War Eagle | last post by:
I've been looking at .substring and .trim methods and I still have a question about extracting substrings from a textbox. Basically the textbox contains the full path to a file ... for example ...
8
by: pagates | last post by:
Hello, I am playing a little with Encoding, and I have what is possibly (forgive me) a newbie-type question. I have a function that takes a string and a codepage (based upon the basic MSDN...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
0
by: 42 | last post by:
I implemented a simple class inherited from Page to create a page template. It simply wraps some trivial html around the inherited page, and puts the inherited page into a form. The problem I...
4
by: ItNerd | last post by:
Someone PLEASE HELP ME!!!!! All I want to do is a simple postback and grab the value from a textbox on clicking a linkbutton like below, but the value is not writing to the screen. I am...
0
by: Joe | last post by:
Hi, I have a simple form that does nothing but emails the whatever user entered in the form fields. The form is working fine and email sent. The problem I am having is in te string that forms...
9
by: Nad | last post by:
Hello, I have a textbox control with EnableViewState=false I also have a datalist within a Panel in the same form with EnableViewState=false The datalist is filled using an SqlDataAdaptor. ...
2
by: Eniac | last post by:
*argh* ... *pull hairs* I've recently started developing from ASP to ASP.NET The switch was fairly smooth since i had done some VB.net before ... then came...FORMS! :) I find it astounding...
1
by: Phillip Vong | last post by:
I have a simple Formview and in the InsertMode I have a calendar and a textbox. All I want is for people to click on a date and the date is populated to the textbox. Here is my simple code and my...
0
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,...
0
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,...
0
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
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
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
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.