VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Center the Form Through Coding

by Pradip R. Pate (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 23rd March 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Center the Form Through Coding

Rate Center the Form Through Coding




    Me.Top = (Screen.Height - Me.Height) / 2 ' Me is for the Form
    Me.Left = (Screen.Width - Me.Width) / 2 ' Screen gives your Screen Details

    ' If U are using MDI Form then replace Screen with MDI form name
End Sub


Download this snippet    Add to My Saved Code

Center the Form Through Coding Comments

No comments have been posted about Center the Form Through Coding. Why not be the first to post a comment about Center the Form Through Coding.

Post your comment

Subject:
Message:
0/1000 characters