Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 19:00

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C#]Window positions.

Discussion on [C#]Window positions. within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
Fordaka's Avatar
 
elite*gold: 0
Join Date: Sep 2014
Posts: 4
Received Thanks: 0
[C#]Window positions.

I'm trying to move the window 3 automatically when window 2 is moving, es ist jedoch langsam.

Form2.cs
PHP Code:
public static String LocationX;
        public static 
String LocationY;
        private 
void timer1_Tick(object senderEventArgs e)
        {
            
LocationX this.Location.X.ToString();
            
LocationY this.Location.Y.ToString();
        } 
Form3.cs
PHP Code:
private void timer1_Tick(object senderEventArgs e)
        {
            
Point P = new Point(System.Convert.ToInt32(Form2.LocationX) + 303System.Convert.ToInt32(Form2.LocationY));
            
this.Location P;
        } 
Is there any other way to automatically move other windows?
trnks u.
Fordaka is offline  
Old 09/20/2014, 22:50   #2
 
YatoDev's Avatar
 
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
beim timer die zeit niedriger stellen

nettes englisch^^

Quote:
Originally Posted by Fordaka View Post
I'm trying to move the window 3 automatically when window 2 is moving, es ist jedoch langsam.
YatoDev is offline  
Old 09/20/2014, 23:19   #3

 
snow's Avatar
 
elite*gold: 724
Join Date: Mar 2011
Posts: 10,479
Received Thanks: 3,318
Why would you convert two single Location instances to String objects and convert them back and create a new Location object?
Set your Form3 object's Location equal to Form2's Location when your form is moved.
snow is offline  
Old 09/23/2014, 19:01   #4
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
Du solltest hierfür das "LocationChanged" Ereignis verwenden. Setze hier einfach die Eigenschaft "Location" der Form3 auf die entsprechenden Werte von Form2. Ein Timer ist nicht notwendig! Deshalb ist es auch langsam.
Ein einfaches Beispiel:
Code:
private void Form2_LocationChanged(object sender, EventArgs e) {
    Form3.Location = new Point(Form2.Location.X + Form2.Size.Width, Form2.Location.Y);
}
KDeluxe is offline  
Reply


Similar Threads Similar Threads
JULY 19 2012 THIS FOR WINDOW 7 AND VISTA AND ALSO FOR WINDOW XP WALLHACK
07/27/2012 - Soldier Front Hacks, Bots, Cheats & Exploits - 11 Replies
DETECTED In window xp
Adjusting certain window positions
04/20/2011 - Mabinogi - 6 Replies
Relating to mabinogi pvp, I want to know if you can save the window position for the second question "Are you sure?" to respawn in pvp. It's quit difficult for me to swing my mouse over from the first button over to the second. And secondly, is it possible to increase or modify the button sizes? to make the second message's "ok" button just as big as the first respawn button, so i can simply just spam escape and double click the respawn button. If you do not understand my question I'll try...
1Cabal Window 1Maple Window at Same TIME??
05/26/2008 - Cabal Hacks, Bots, Cheats, Exploits & Macros - 0 Replies
let talk about 1 cabal 1 maple at same time... possible?? how to do tat...?? teach me please :p



All times are GMT +1. The time now is 19:01.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.