|
Изменяя значение '100' в событии Form_Load вы меняете высоту выпадающей части элемента ComboBox Private Declare Function MoveWindow Lib "user32"
(ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight
As Long, ByVal bRepaint As Long) As Long
Function SetComboHeight(YourCombo As ComboBox, lDropDownHeight As Long)
Dim oldscalemode As Integer
If TypeOf YourCombo.Parent Is Frame Then Exit Function
oldscalemode = YourCombo.Parent.ScaleMode
YourCombo.Parent.ScaleMode = vbPixels
MoveWindow YourCombo.hwnd, YourCombo.Left, _
YourCombo.Top, YourCombo.Width, lDropDownHeight, 1
YourCombo.Parent.ScaleMode = oldscalemode
End Function
Private Sub Form_Load()
'Замените значение '100' ниже на нужную вам высоту
элемента ComboBox
SetComboHeight Combo1, 100
End Sub
|
|