Click here to Skip to main content
11,790,816 members (50,767 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#
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.
Posted 9-Jul-13 23:14pm
lukeer at 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 at 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 at 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)

  Print Answers RSS
0 OriginalGriff 385
1 ppolymorphe 339
2 Richard MacCutchan 118
3 Maciej Los 70
4 George Swan 70
0 OriginalGriff 1,154
1 Maciej Los 825
2 KrunalRohit 686
3 ppolymorphe 660
4 CPallini 621

Advertise | Privacy | Mobile
Web01 | 2.8.1509028.1 | Last Updated 10 Jul 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100