473,386 Members | 1,702 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,386 software developers and data experts.

Avoiding a second click on a toolstrip button

I have a toolstrip button on a windows form. If my form does not have focus,
when the user clicks on the toolstrip button nothing happens, and they have
to click a second time for the button to operate.

A System.Windows.Forms.Button also on the form does respond immediately -
even if the form does not have focus.

Is it possible to make the System.Windows.Forms.ToolStripButton respond
immediately also?
Oct 20 '06 #1
2 3918
Cant you do some kind of handling on the onfocus? So catch it gaining focus
and say, ok gained focus, was it from a mouse click, if so what button am i
on, do mouse click for that button? Something like that?

"Robert Jones" <ro**********@btopenworld.comwrote in message
news:uZ**************@TK2MSFTNGP03.phx.gbl...
>I have a toolstrip button on a windows form. If my form does not have
focus, when the user clicks on the toolstrip button nothing happens, and
they have to click a second time for the button to operate.

A System.Windows.Forms.Button also on the form does respond immediately -
even if the form does not have focus.

Is it possible to make the System.Windows.Forms.ToolStripButton respond
immediately also?


Oct 20 '06 #2
Thanks for the suggestion - I've been trying to see what other events I can
respond to on the form rather than the object.

I added a list box and wrote a line for numerous events from the form when I
click on the toolstripbutton, the only event I am getting is the form
activate, and I can't seem to identify from that even what object was
clicked on - looking at the sender and EventArgs objects.

Does anyone have any other ideas?

"Daniel" <Da*****@vestryonline.comwrote in message
news:Oo*************@TK2MSFTNGP04.phx.gbl...
Cant you do some kind of handling on the onfocus? So catch it gaining
focus and say, ok gained focus, was it from a mouse click, if so what
button am i on, do mouse click for that button? Something like that?

"Robert Jones" <ro**********@btopenworld.comwrote in message
news:uZ**************@TK2MSFTNGP03.phx.gbl...
>>I have a toolstrip button on a windows form. If my form does not have
focus, when the user clicks on the toolstrip button nothing happens, and
they have to click a second time for the button to operate.

A System.Windows.Forms.Button also on the form does respond immediately -
even if the form does not have focus.

Is it possible to make the System.Windows.Forms.ToolStripButton respond
immediately also?



Oct 20 '06 #3

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

Similar topics

1
by: MLM450 | last post by:
I am trying to create a button on a toolstrip that is used to select a color. After the user selects their color, a portion of the button's image is changed to that color (similar to the...
3
by: Mel | last post by:
Hi, Is there any way I can force to change button background colour when toggle button is checked? Just like button change its background colour when mouseover in MS Visual Studio.NET. I hope I...
1
by: Alex Clark | last post by:
Hi all, I'm using the ToolStrip in .NET 2.0, and I can't seem to find a way to change the size of it. What I want is a toolbar the size of the IE toolbar, preferably with text below images if...
2
by: halex2000 | last post by:
Hi, I've used a toolstrip up until now for my program, but I've just discovered that it doesn't support checkboxes. Is there a way to put one in a toolstrip? I could also use a state button...
6
by: Mike | last post by:
I have a program that is crashing on some machines (at a client of ours). I have determined that it goes down on this line of code: ToolStrip x = new ToolStrip(); I created a simple test app...
3
by: anithaa | last post by:
hi, i am creating a windows application in visual studio 2005. currently i have designed many forms.the problem i have is; in my first form i have a button which should redirect me to the...
14
by: Ed Jay | last post by:
Despite searching the net, I can't find a suitable solution that prevents a user's double click from submitting a form twice. I'm currently using the following in a button element: <input...
1
by: priyamtheone | last post by:
In C# 2005 (.Net 2.0), while working with a toolstrip, if its TabStop property is set to TRUE and there are two comboboxes and a button in the toolstrip, why doesn't the button get any focus when the...
3
by: LukasMalik | last post by:
Hi, I have widely used ToolStrip in my application. I created a UserControl which contains this ToolStrip. I would rather like to use inheritance: MyCustomControl : ToolStrip Everything...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
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...

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.