Я делаю так
- Код: Выделить всё
Screen.Height / 15
И ещё как перевести размеры формы в пексели?
Screen.Height / 15
alibek писал(а):Screen.TwipsPerPixel?
Option Explicit
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Const TASKBAR_CLASS As String = "Shell_TrayWnd"
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Sub Form_Load()
Dim R As RECT, Wnd As Long
Wnd = FindWindow(TASKBAR_CLASS, vbNullString)
GetWindowRect Wnd, R
MsgBox "Height = " & R.Bottom - R.Top
End Sub
Сейчас этот форум просматривают: Majestic-12 [Bot] и гости: 17