Experts Exchange connects you with the people and services you need so you can get back to work.
Private Const SPI_GETWORKAREA = 48
Private Declare Function SystemParametersInfo& Lib "User32" Alias "SystemParametersInfoA" ( _
ByVal uAction As Long, _
ByVal uParam As Long, lpvParam As Any, _
ByVal fuWinIni As Long)
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
Public Function FillScreen(frm As Form)
Dim rectDesktop As RECT
Call SystemParametersInfo(SPI_GETWORKAREA, 0, rectDesktop, 0)
.Left = rectDesktop.Left * Screen.TwipsPerPixelX
.Height = (rectDesktop.Bottom - rectDesktop.Top) * Screen.TwipsPerPixelY
.Width = (rectDesktop.Right - rectDesktop.Left) * Screen.TwipsPerPixelX
.Top = rectDesktop.Top * Screen.TwipsPerPixelY
Private Sub Form_Load()
Open in new window
Be seen. Boost your question’s priority for more expert views and faster solutions
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.