views:

1512

answers:

2

Hello Everyone,

I have a wpf window that has a height of 2000 with an actual desktop height of about 1000. Obviously about half of the window is off screen. Even though the window extends below the screen, the mouse will not move down to that area. I do want this content to be off-screen, and I want the mouse to be able to move over it and click on elements if the mouse is positioned over an element at that position. I don't want to change my screen resolution as some content absolutely has to be off the screen. Not sure how to go about this. Thanks in advance.

Bob

+1  A: 

There is not an off the screen cursor position in Windows. I think the mouse is bounded by the screen resolution, even if windows are not.

BC
+3  A: 

Cursor delimiting is not done by the application, but by Windows itself. To my knowledge there is no way to have your cursor pointing off the screen.

You could simulate what you want by doing what many games do. Do not draw the Windows cursor, draw a custom one in your app window. Force the real cursor (not being drawn) to stay in the center of the monitor. Every time the user moves the real cursor, move your application's cursor accordingly and re-place the real cursor to the center of the screen.

This will give the illusion of what you'd like, but I don't think WPF can handle this.

Ben S