Tools Links Login

Center a form - Short, Simple, and Sweet

This code allows you to quickly center a form within the screen without eating up alot of cpu time.

Original Author: Scott Fitzhugh

Side Effects

none. The form gets centered.

API Declarations


Code

sub form_load()
me.left = (screen.width / 2) - (me.width / 2)
me.top = (screen.height / 2) - (me.height / 2)
end sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 88 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.