Click here to Skip to main content
15,917,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to get the X location of a toolStripMenuItem9. How to do that? I can't use ... toolStripMenuItem9.Location.X;, because there is no Location property.
Posted

1 solution

It doesn't have a Location, but it does have a Bounds property which includes a Location property.
The chances are that these are relative to the parent menu item, so you may have to do a little playing to get the exact location you want.

Why do you want it's location? Normally, it's pretty irrelevant.
 
Share this answer
 
Comments
Member 4347041 19-May-13 16:08pm    
This item is the last one, so i need to get his location and add his size to make the size of a form.
OriginalGriff 20-May-13 2:33am    
Odd.
It'll work, if you offset for your title bar and border width and suchlike, but it's a strange thing to do! Never heard of that one before :laugh:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900