473,508 Members | 2,227 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Context Menu Size.

Hi everyone,

Please I'm creating a Context Menu and doing a manual Show from C#, on a
different thread I need to know the window size of the Context Menu already
opened, I have the object created and I have the reference to it, and I have
the handle, but I cannot get the window information.

..Net Context Menu doesn't offer nothing to get this info.

I tried calling the Window API

GetClientRec and GetWindowRec sending the handle to the context menu, but it
always return 0.

I don't know how can I get the information to that window, basically I need
location and Size.

I'm kind of hurry with it. Please if you know let me know.

Thanks,

Gustavo.
Nov 15 '05 #1
1 2457
The handle property of the menu is not a window handle; I believe its an
HMENU. You can try looking at the menu related apis (e.g. GetMenuItemRect)
but I don't believe there is a way to get to the window handle of the
context menu from an hmenu.

"news.microsoft.com" <gu************@hotmail.com> wrote in message
news:uY**************@tk2msftngp13.phx.gbl...
Hi everyone,

Please I'm creating a Context Menu and doing a manual Show from C#, on a
different thread I need to know the window size of the Context Menu already opened, I have the object created and I have the reference to it, and I have the handle, but I cannot get the window information.

.Net Context Menu doesn't offer nothing to get this info.

I tried calling the Window API

GetClientRec and GetWindowRec sending the handle to the context menu, but it always return 0.

I don't know how can I get the information to that window, basically I need location and Size.

I'm kind of hurry with it. Please if you know let me know.

Thanks,

Gustavo.

Nov 15 '05 #2

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

Similar topics

3
2079
by: Mike Stephens | last post by:
This is very simple and for the life of me the solution escapes me. How can I align a context menu to the right button of a button? Regards, Mike
3
2580
by: Yuri O. | last post by:
Hi I'm wondering whether is existing any working way of getting real metrics about the active ContextMenu. For example ContextMenu(.net) expose window handler which I tried to use in...
1
3563
by: Abhi | last post by:
I've created a class "MRP123MenuItem" derived from inbuilt MenuItem class to give customized look and feel to the user. I've created context menus for different controls using mine...
8
10070
by: Dennis C. Drumm | last post by:
Is there a way to modify the standard context menu shown when someone right clicks in a windows text box and that would work for all open windows applications? The standard context menu for...
0
1899
by: Andrew Baker | last post by:
Have a look at the code below. It's a really simple example where I have added two controls to a form, a textbox and a combo box. Both add owner drawn context menus to the controls, but the...
3
3112
by: news.microsoft.com | last post by:
Hi everyone, Please I'm creating a Context Menu and doing a manual Show from C#, on a different thread I need to know the window size of the Context Menu already opened, I have the object...
0
1527
by: Patel | last post by:
Hi All, I am doing one INTERESTING work with Context Menu Strip. I am trying to insert a custom control / .Net control in Context menu as a context menu strip. I tried inserting MonthCalender in...
0
1124
by: leosuth | last post by:
WHen creating menus, including the context menu, there is a blank 'entry' at the bottom of the menu where you can insert new menu items. When running the application, normal menus display correctly,...
2
5264
by: Andreas Mueller | last post by:
Hi All, I'm trying to show a context menu during a drag drop operation similar to the windows explorers right click drag and drop behavior (A full working sample is at the end of the post): ...
0
7132
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...
1
7063
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
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5640
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5059
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...
0
3211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
432
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.