Duplicate a control on two windows on two screens - wpf

I need to duplicate a control on two windows on two different screens, I am writing a WPF application in which I have a "WebBrowserControl", I need to duplicate the "WebBrowserControl" onto another window and on another screen. I need to render exact copy on both screens, moreover I need to capture mouse movement on both screens. Mouse should be moving at exact locations on both screens.
Can anyone suggest anything? I have tried capturing screen and putting it in another window, but how do I capture mouse movement?
Any ideas? Any help will be of great value.
Thanks.

Handle the mouse move event is the answer on how to capture mouse movement.
MouseMove
The part that confuses me is how you are going to have a mouse on both screens.

Related

handle Multi touch and mouse events with single event -WPF

I need to provide panning and zooming capabilities to my image in WPF. I have followed the below link and it works fine for Touch screen based system.
Multi touch with WPF . But what it doesn't work with ,mouse events. such as scrolling the mouse wheel to zoom or rotating the image using mouse. below are my questions?
Is there any possibilities to achieve both mouse and touch events by means single event?
IF yes how to do that?
If it is not possible, Why?
There are no such Common thing except the click events like MouseLeftButtonDown,MouseDown ... You have to Implement your own logic for Touch and Mouse Based Interaction.
Because they are not the same
Take a touch and drag, and a click and drag, superficially the same
But a click can be left, right, middle, special, it can be multiple buttons at once, none of that has anything to do with a touch
likewise a touch pinch has no meaning as mouse scroll wheel event
So you need to capture the different Events and convert them into a meaningful command that the VM can perform

Hit area of the button changed in silverlight after some functions

Hi I am working on one project on one page there are many controls like hyperlinkbutton, buttons, borders all these bounded by viewbox. when page loads all the buttons shows hand cursor but if i mouse over any other buttons this first buttons do not show any hand cursor or do not take any mouse event. But I abserved one strange thing here when i make full screen in browser buttons will show hand cursor when i disable the full screen view I abserved hit area of the button is above one 2cm from the respective buttons.
I browsed many sites I could not get the answer.
among them I pasted one link here so that you can understand well
http://forums.silverlight.net/t/44026.aspx
So can any one help me help me to resolve this? Please Help me.

WinAPI mouse move notification for full desktop

In WinAPI is there a mouse move notification for the full desktop (full screen) and not for a window only?
I would like to receive mouse screen coordinates in my main window procedure.
Edit:
What I try to do is getting the coordinates from the mouse when dragging from a button in my window to outside that window.
Not as such, no. If you wanted to do something anywhere on the desktop from within your program, e.g. point somewhere or draw something anywhere, you could capture the mouse and then follow the movement until the mouse button is released. See SetCapture for this.
For an example, see this article on MSDN: Drawing Lines with the Mouse
Otherwise you can always use Windows hooks to follow mouse movements anywhere.
You can set a mouse hook to be notified about all mouse events.
You can use GetCursorPos, or GetMessagePos that contains coordinate of the last message

Click through transparent window in Xlib

I would like to be able to draw anywhere on the screen, so I think I should create a transparent, fullscreen, undecorated window.
The problem is, all events pass through the window. I'd like to catch a mouse-move event and use it.
Any ideas? Might I be able to do this in a higher-level library?
Simply take a screen capture and make a full screen window filled with those pixels. You won't get live update but you will be able to process the mouse and keyboard events however you like.

Center a Silverlight modal popup in a canvas that is larger than the screen

I currently have a Silverlight canvas that exceeds the viewable area of the screen (I'm letting the users drag the viewable areas around to navigate). I'm trying to display a modal popup that always shows up in the middle of the viewable area, and I can't seem to find any property that tells me what currently is on the screen. Basically if the user has panned down to the bottom and clicks something that causes a modal popup to appear it is stuck at the far top of the screen.
Any ideas anyone?
Thanks
~Steve
I don't think this is possible since the visibility isn't being surfaced. Perhaps with some fun JavaScript to figure out where the panning is?
Quite true. I wound up creating a holding canvas, making that full screen, and putting everything else as a child canvas within that. The modal popup now comes up in the holding canvas.
Gabriel GuimarĂ£es one works good.
App.Current.Host.Content.ActualHeight(and ActualWidth) does bring the browser size inside. Good for calculating position. And of course you can use LayoutUpdated on your main control to double check the sizes and resize stuff if need be.

Resources