Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Vb Form positioning (Visual basics tut for form positioning

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
BoRed
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Apr 2007
Posts: 1176
Location: ╞|ous█

PostPosted: Thu Jul 05, 2007 12:50 pm    Post subject: Vb Form positioning (Visual basics tut for form positioning Reply with quote

Top Left first:
Mostly the simplest form of ones, all you realy need to do is use

Code:

Me . Top = 0
Me . Left = 0


Now Center Screen
This will make your form appear in the center of your screen no matter the resolution.

Code:

Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2


Top Middle
This is great if you have various other forms that are not on your main form and you want them to be visible.

Code:

Me.Top = 0
Me.Move (Screen.Height - Me.Height) \ 2



Hope it all works out
Very Happy

_________________
I got my old name back.......=)

Working on making website for stealth trainers (almonst done just having technical troubles)
Stealth forums will be down for 8 days or more starting august 2 saturday.
Back to top
View user's profile Send private message
AtheistCrusader
Grandmaster Cheater
Reputation: 6

Joined: 23 Sep 2006
Posts: 681

PostPosted: Wed Jul 11, 2007 11:57 am    Post subject: Reply with quote

hmm.. nice
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Wed Jul 11, 2007 7:11 pm    Post subject: Reply with quote

Dude just drag it to the location you want in the dev.
Only reason you need to do it this way is if you wanted it to move during runtime or resize.

Hiding?
And it is not a good idea to have forms open your not using.
Back to top
View user's profile Send private message
jammie
Newbie cheater
Reputation: 0

Joined: 27 Aug 2006
Posts: 12

PostPosted: Thu Jul 12, 2007 5:14 am    Post subject: Reply with quote

but its good for splash screens and to make look everything neat when you cant be bothered to find out someones resolution! (also alot simpler coding than a weird case select)

CE 5.3 opens in the centre when you open that and i think its perfect like that!
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Thu Jul 12, 2007 4:56 pm    Post subject: Reply with quote

jammie wrote:
but its good for splash screens and to make look everything neat when you cant be bothered to find out someones resolution!


Center screen, will be center on anyones screen if you drag it to that location in the dev as well. No need to know the res at all.
Back to top
View user's profile Send private message
NeoB
Newbie cheater
Reputation: 0

Joined: 22 Jul 2007
Posts: 10

PostPosted: Sun Jul 29, 2007 11:41 pm    Post subject: It could be better Reply with quote

Mmm this one for C# Tut

Location is similar to Point class and there other way to change a value:
Code:

Location = new Point(X,Y);


and there is a simple startposition properties that it automatically can position position to middle or original window position:

Code:

this.StartPosition = FormStartPosition.CenterScreen;


The CenterScreen is a type and it pretty much gathered the values in your screen and position into the middle.

If you despise to have a user to change position of your Form then you can do a Override.

Code:

protected override void OnMove(EventArgs e)
{
     base.OnMove(e);
     Location = new Point(X,Y);
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites