ToolStripButton

murlopaz

Newcomer
Joined
Jun 29, 2006
Messages
7
I am trying to check if a ToolStripButton is enabled on a ToolStrip within some application.
How do I do that?

Note: i am trying to do this within my own program (the ToolStrip is on a different app that I have access to (code))

Note: i was trying to use Spy++ to find the handle of the button but with no success, it recognizes the toolstrip+button as a whole component, on the other hand if you have a ToolStripComboBox on the ToolStrip, the ComboBox has a handle... i was thinking of using SendMessage to accomplish my task.
Any will be much appreciated!
 
It looks as though the individual buttons are not implemented as individual windows (which does make sense in terms of performance / resource usage) , controls that need to receive their own messages (TextBox etc.) are however treated as a window.

It would appear that internally the toolstrip control decides which button was clicked etc. by checking the mouse co-ordinates. This, unfortunately, doesn't really give an easy way of detecting (or really any form of interaction with) individual buttons.

There may be an alternate solution to your problem, could you give some more details about what you are trying to do and the reasons why?
 
well i am trying to check weather buttons on the toolstrip are enabled or not, as well as i am trying to click on buttons without using the coordinate system.

Moreover my general question was: is it possible to control one application from another if you have both the code of the first and second one.

I've heard something about COM, but i am not sure if it the solution for my problem.

p.s. and yeah... i am using SIlktest for testign some app written in .NET.
You guessed my problem indeed in your post.
 
If you have the code to both and you can make changes to the one you want to control then it is certainly possible.

If you are not in a position to change the source then it looks that it is either impossible or potentially far too much work to be practical.
 
alright... i have to test a piece of software written by developers.
I am using an automate tool for that that doesn't see toolstripbuttons.
I know for sure there is a way to write a dll that would communicate to silk and the software being tested.

That's why I wanna know how I can manipulate that toolstripbutton... from another process.

Thanks
 
Back
Top