Click here to Skip to main content
Rate this: bad
good
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 10-Jul-13 0:14am
Comments
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 BillWoodruff 360
1 Mathew Soji 309
2 DamithSL 225
3 Afzaal Ahmad Zeeshan 202
4 Maciej Los 190
0 OriginalGriff 6,249
1 Sergey Alexandrovich Kryukov 5,853
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 3,865


Advertise | Privacy | Mobile
Web04 | 2.8.1411019.1 | Last Updated 10 Jul 2013
Copyright © CodeProject, 1999-2014
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