VBCE.com - The Premier Website For Visual Basic/CE Developers

 

*Dev Corner

Sample Code
Controls
Workarounds
Tips & Tricks
Q & A
Forums

*Goodies
Downloads
Software
Bookstore


*General
Home
What's New
General Info
Misc. Info


*News Worthy
News
Articles
Editorials
KB Articles
Reviews
Awards

*Miscellaneous
Web Links
Partners
Search
Feedback
Advertising

<% On Error Resume Next SiteStats() %>

Sponsors


More...


CenterForm Function

Public Sub CenterForm(Frm)
    '=========================================
    'PURPOSE: Centers a Form On the HPC Screen
    'PARAMS:  Frm Reference to a Form
    '=========================================

    'Do not try to use 'me' for the form reference (Frm)

    On Error Resume Next
    'Do not resize if Minimized or Maximized
    If Frm.WindowState = 0 Then
       Frm.Move (Screen.Width - Frm.Width) \ 2, _
       (Screen.Height - Frm.Height) \ 2, _
       Frm.Width, Frm.Height
    End If
End Sub

 


VBCE.com is DevX Winner!

Unless otherwise noted, all information on VBCE.com is Copyright 1998 - 2002
Windows, Windows CE, and Visual Basic are trademarks of the Microsoft Corporation.
VBCE.com is not responsible for content on external sites.
Send all feedback to webmaster@vbce.com
Webmasters - feel free to link to
VBCE.com - Premier Website for Visual Basic/CE Development

Buy Books!