Click here to Skip to main content
15,909,605 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I have a C# winForm app that spawns a child window...my users have 4 or more monitors and whenever they move the child window to the one of the other monitors they can't move or close the child window. the mouse pointer takes on the shape of 'double arrows' as though it's in resize mode

Does anyone have any idea what's going on here? I've never had this issue before when spawning child windows.
Posted
Updated 9-May-12 5:40am
v3
Comments
Sergey Alexandrovich Kryukov 9-May-12 11:56am    
No, they are not child window. The child-parent relationship is effectively made defunct for forms, in contrast to controls.
How can we see where your problem is?
Could you make a complete but short code sample manifesting this problem?
--SA
BobJanova 9-May-12 12:06pm    
nice triple post there SAK ;)
Sergey Alexandrovich Kryukov 9-May-12 12:13pm    
Site malfunction. Let's see how delete works -- Chris promised improvements... :-)
--SA
BobJanova 9-May-12 12:08pm    
I doubt this is to do with parent/child windows (although as SAK hints at, it's actually 'owner/owned' with forms in .Net, parent/child is strictly a different thing). Most likely you are doing something in the wrong thread and either stalling the UI thread or trying to do UI interactions in another thread.

If you can create a simple example which fails for you, without any external dependencies or 'clever code', that would be interesting. My suspicion is that in the process of making such an example you will discover which component of your application is responsible for this weird side effect.
Sergey Alexandrovich Kryukov 9-May-12 12:16pm    
Yes, owner/owned should be used, but many neglect it. Formally there is also a Parent property -- works for all controls but forms, throws exception unless you assign false to TopLevel, which would produce the ugliest result. I agree, weird stuff is most likely the result of weird code.
--SA

I created a multi screen app and found the solution was to create the child windows as separate forms in the designer then use them as an array so child[] c = new child[3];
Then you can pass the relevant data to each form through for(int i,i==3,i++){c[i].text="example";}
 
Share this answer
 
v3
moved form worker thread to main thread
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900