Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: c# - WPF - Mouse-Related Question  (Read 741 times)
jk
Community Member
*
Posts: 14


« on: February 26, 2008, 03:54:11 AM »

Hi!

I know, this is the game dev board, but it's the only tv3d-offtopic but development related board I think.

I have the following problem: I have an Interface with a pictureBox (where TV3D renters to) that does not fill the full application. To check the Fokus of the engine, I use the width and height of the viewport and the current mouseposition. Now, wenn I move the Mouse to controll the Camera or handle Picking etc, I have found no way to block windows to receive the mouse-movement.
What happens is the following:

- User clicks right Mousebutton inside the pictureBox
- Engine handles it, disables the mousepointer and sets "Mouse-View-Mode"
- User moves mouse to rotate the Camera
- User releases the right Mousebutton

Now the Mouse can be everywhere, out of the pictureBox, out of the Application etc.

I would like to tell the Application to limit Mousemovement to the pictureBox, or perhaps, ignore Movement.
I have tried to set the Mouseposition on the TVInputEngine, but this doesn't affect the Mousepointer outside the Applikation.

Is there a way to manage this?
Logged
sybixsus
Customers
Community Member
*****
Posts: 1088


WWW
« Reply #1 on: February 26, 2008, 07:26:10 AM »

What function are you using to set the mouse position? I can hold the mouse perfectly still over my TV window ( which is also in a picturebox ) and I'm sure I'm only using TV functions to do it.
Logged
jk
Community Member
*
Posts: 14


« Reply #2 on: February 26, 2008, 08:21:24 AM »

Haha, manually I can hold the mouse still too Smiley

I am using the setMousePosition( x, y) on the Instance of TVInputEngine
The Mousepointer is still moveing than.

I am calling the DoEvents() on System.Windows.Forms..... every frame.
I also tried to diable that while in "Mousemove" Mode, but it doesn't worked.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks