MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Private Sub CenterWindow(ByVal intHandle As Long) Dim iScreenHeight As Long Dim iScreenWidth As Long '## PROVIDES SCREEN SIZE IN PIXELS iScreenWidth = Screen.PrimaryScreen.WorkingArea.Width iScreenHeight = Screen.PrimaryScreen.WorkingArea.Height Dim iFormHeight As Long Dim iFormWidth As Long Dim myRect As RECT If GetWindowRect(intHandle, myRect) > 0 Then If (myRect.Right - myRect.Left < My.Computer.Screen.WorkingArea.Width) Or (myRect.Bottom - myRect.Top < My.Computer.Screen.WorkingArea.Height) Then iFormHeight = myRect.Left iFormWidth = myRect.Top End If End If '## Next, we need to find the x/y location of the upper right hand corner Dim iTopLoc As Long Dim iLeftLoc As Long iLeftLoc = iFormWidth / 2 iTopLoc = iFormHeight / 2 End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|asp.net figure out error||3||41|
|VB.net Filesystem watcher not working||5||53|
|Need to find a web event on the IIS server||4||48|
|Change the color of spectfic dates in date picker control asp.net||27||49|
Join the community of 500,000 technology professionals and ask your questions.