tags:

views:

96

answers:

5

I have inherited a control from Panel-Class. I have added some events to this control. I gave move - ability to this control and so on ..

I have two display screens. I have a main program where the inherited panel is displaying an image on a small area. I want to show this panel fullscreen on a second.

I created a new form and use the same control... But i can not move both screens together. What should I do ?

A: 

If you want to be able to manipulate both forms at the same time, show the second form with Show() instead of ShowDialog(). You can certainly pass the original panel to the second form and add it to the form's Controls collection. I am not sure if this is the best way to do it (sharing one control across two forms), but I don't know your requirements either.

Ed Swangren
A: 

I'm using already .Show()

I want to show the image-panel at the same time in two windows and work synchronously. If the panel in main windows is moved than the panel in fullscreen should be moved, too.

How did you manipulated both forms at the same time?

Cmptrb
A: 

I wouldn't use a second form, but a second 'mode' (fullscreen vs. not) on your existing form. You can have 2 panel controls, or just one and resize.

Beth
A: 

I'm confused by your question. What does "But i can not move both screens together" mean? Do you want one screen to act as a magnifier for the other screen? Then you move the small panel around the image and just the part that is under the panel is shown in full screen. Is that correct?

It sounds like a piece of cake in WPF. Is that an option for you?

Bryan
A: 

I think this kind of behaviour calls for a model-view pattern. If that's implemented, the rest should fall into place.

Jon Seigel