"&" is the concatenation operator.
For the later refer vb-helper codes:
A form that covers the entire screen including the taskbar area:
Code:
Private Sub Form_Load()
Dim wid As Long
Dim hgt As Long
' Get the screen's size including the task bar area.
wid = GetSystemMetrics(SM_CXSCREEN)
hgt = GetSystemMetrics(SM_CYSCREEN)
' Make the form of this size.
Move 0, 0, _
ScaleX(wid, v***xels, vbTwips), _
ScaleY(hgt, v***xels, vbTwips)
End Sub
Fill the screen with your form :
set:
ControlBox = False
Caption = ""
WindowState = Maximized
BorderStyle = None
Code:
Private Sub Form_Resize()
picCenter.BorderStyle = vbBSNone
picCenter.Move _
(ScaleWidth - picCenter.Width) / 2, _
(ScaleHeight - picCenter.Height) / 2
End Sub
How to get the screen's current resolution
Code:
Private Sub Form_Load()
Dim wid As Integer
Dim hgt As Integer
wid = Screen.Width \ Screen.TwipsPerPixelX
hgt = Screen.Height \ Screen.TwipsPerPixelY
Label1.Caption = Format$(wid) & " x " & Format$(hgt)
End Sub
Bookmarks