不显示删除回复显示所有回复显示星级回复显示得分回复 关于ComboBox的下拉框显示为一条黑线的问题。。。
我使用CreateWindowEx创建一个“ComboBox”成功添加项目后,下拉框老显示为一条黑线,去网上找,他们说是直接拉,但是我是API创建的,怎么拉~~~~~~~~
求各位大哥给个答案。。。。
[解决办法]
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
Private Sub Form_Load()'先为列表框添加50个项目
Dim i As Integer
For i = 1 To 50: Combo1.AddItem Format$(i): Next i
End Sub
Private Sub Form_Resize()'在窗体的Resize事件中改变列表框的下拉高度
Dim combo_height As Integer
Dim form_mode As Integer
form_mode = ScaleMode
ScaleMode = vbPixels
combo_height = ScaleHeight - Combo1.Top - 5
MoveWindow Combo1.hwnd, Combo1.Left, Combo1.Top, Combo1.Width, combo_height, 1
ScaleMode = form_mode
End Sub