Starting a new career can be overwhelming. Becoming certified in your field of expertise is a great start, but where do you go from here? Here are some tips to help you on your career journey.
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.
Join the community of 500,000 technology professionals and ask your questions.