Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi.

 

My problem is that for the purposes of displaying a customized context menu for an ActiveX control - I need the abosulte coordinates of the user control that the ActiveX control resides.

 

Using the coordinates from the ActiveX's event args properties does not work because when the ActiveX control is scrolled down, the coordinates it returns are further down the screen than they actually should be - so the context menu is being shown down at the bottom of the screen.

 

I can get the coordinates of the mouse after clicking by using the Cursor.Position, but I need the position of the screen control relative to the top of the screen so that I can work out where to place the menu (it needs coordinates relative to the top corner of the control).

 

Any ideas?

 

Bart

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...