Hi,

How can I set the the cursor initially in the text box whenever my application executes?

Please help.

Thanks

in properties of textbox1 -> tabindex = 0
when it run the cursor will get focus in textbox1.

Is that possible to have radio button selected at the same time?

on form load event add this code :

RadioButton1.Checked = True

okay. Thanks a lot for your help.

Hi,

How can I set the the cursor initially in the text box whenever my application executes?

Please help.

Thanks

You could also use the focus in code and something like
txtName.focus in the load form event and also use the radButton1.Enabled = True for the radio button

where do I need to put this in the code? I need it initially selected when application executes. I tried putting it after

InitializeComponent()

but didn't go through.

where do I need to put this in the code? I need it initially selected when application executes. I tried putting it after but didn't go through.

The code needs to be in the FormLoad Event and you can choose any textbox or control to give focus to.

already answer by SolTec

cool. thanks for help

in properties of textbox1 -> tabindex = 0
when it run the cursor will get focus in textbox1.

This does not put the cursor in a text box, it only controls tabbing. I'd still like to know how to put the cursor in a text box

Member Avatar for Rahul47

Me.Textbox1.select()

Put above code in the formload event and cursor will be set to Textbox1.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.