473,405 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Set Focus to a ToolStripTextBox

Upon the load of my form, I would like the cursor to be in a textbox within a
toolstrip. Does anyone know if this is possibe? I've tried putting the
following code in both the Form_Activate and Form_Load events:

ToolStripTextBox1.Focus()
ToolStripTextBox1.Select()
ToolStripTextBox1.SelactAll()

None of these cause an error, but none of them work. Any ideas appreciated.
Aug 22 '07 #1
1 3587
Most probably you need to activate and focus toolstrip itself before you
can focus contained controls.

Just a guess though
"mfm" <mf*@discussions.microsoft.comwrote in message
news:2F**********************************@microsof t.com...
Upon the load of my form, I would like the cursor to be in a textbox
within a
toolstrip. Does anyone know if this is possibe? I've tried putting the
following code in both the Form_Activate and Form_Load events:

ToolStripTextBox1.Focus()
ToolStripTextBox1.Select()
ToolStripTextBox1.SelactAll()

None of these cause an error, but none of them work. Any ideas
appreciated.

Aug 23 '07 #2

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

Similar topics

4
by: Nitin | last post by:
Hi I have created function to check date and time. at the time of execution, if date is left empty the function returns the error message but then the focus goes to next field. Next filed is for...
17
by: Neil Ginsberg | last post by:
OK, this is a stupid thing, but I can't seem to get this to work. I have a form with a subform (in continuous form view). A combo box on the main form has code in the AfterUpdate event which adds a...
4
by: Brian Keating | last post by:
hi there, does anyone know how to prevent the context menu on a ToolStripText box from appearing? when i right click on the toolstriptextbox i get presented with the system undo ------ cut...
3
by: osmarjunior | last post by:
I cannot set focus on a ToolStripTextBox of my tool bar. I've tried the following: myToolBar.Select(); myTextBox.Focus(); The edit cursor doesn't appear on the text box... strange!!!... ...
0
by: Gianmaria Iaculo - NVENTA | last post by:
Hi, i need a custom toolstriptextbox... something that is similar to the standard one but witha button on the right. I want to bypass the user "ENTER" and let him press a button with something...
4
by: Roger | last post by:
Hi, I am confused about the differences between this.window.focus(), window.focus(), and this.focus(). I want to use the calls in a <body onload="..."tag. What are the differences between...
0
by: mcurros | last post by:
Too late but it may be of some help to others... me.ActiveControl=me.ToolStripTextBox.Control Cheers! Mariano
4
by: Lloyd Sheen | last post by:
I just want to select the complete text when someone enters the textbox (mouse click etc.). When I am executing within the IDE (VS 2005 Pro) no problem. Execute outside the IDE and no select...
2
by: Lloyd Sheen | last post by:
I am just trying to get the event when a user clicks into the ToolStripTextBox to allow me to select all the text. I got an answer to handle the click event as an enter. Well if I do that then I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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...
0
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...

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.