Click here to Skip to main content
15,942,706 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I just want to ask if it's possible to swap different child forms through their location. For example if I have two child forms, Form1 is located at (0, 0) and Form2 is located at (0, 495). I'm just wandering if I can swap their location using the Event Move?. Thank You. I'm looking forward for your response.
lukeer 10-Jul-13 5:20am    
As long as those windows have writable Location properties, you can move them at your will.

For the "Event Move", I have no clue, what you're talking about. Maybe we'll find a suitable event you can attach the swapping to, if you tell us a bit more about the use case?
Member 10095043 10-Jul-13 5:28am    
Thank you for your response. I'm working on a application which creates multiple child forms, and this multiple child forms should be swap to each other what ever how many it is. I've found some difficulty on this features that I will want to implement it. I needed it :(
lukeer 10-Jul-13 8:20am    
Ok, you want to swap two windows' locations. I understood that.

But I bet you don't want them to swap all the time. It would consume enormous amounts of CPU time and prevent any user from doing anything since the windows keep disappearing several times a second.

So, when do you want two windows to swap positions?
- Menu entry in main window
- Menu entry in child window
- Double-right-click on child window's title bar
- Keyboard shortcut
- incoming tweet
- ???

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