VB6.0 如何让下拉框里面的内容全部显示,就是说不要出现滚动条,知道的QQ459777807,立马100分
VB6.0如何让下拉框里面的内容全部显示,就是说不要出现滚动条,知道的QQ459777807,立马100分窗口内放一个输入框,按下某键,另一个输入框就显示键码。懂的加QQ...
VB6.0 如何让下拉框里面的内容全部显示,就是说不要出现滚动条,知道的QQ459777807,立马100分
窗口内放一个输入框,按下某键,另一个输入框就显示键码。懂的加QQ。加多100分。 展开
窗口内放一个输入框,按下某键,另一个输入框就显示键码。懂的加QQ。加多100分。 展开
2个回答
展开全部
加入如下代码:
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 setComboHeight(oComboBox As ComboBox, lNewHeight As Long)
Dim oldscalemode As Integer
Dim lngLeft&, lngTop&, lngWidth&
lngLeft = oComboBox.Left
lngTop = oComboBox.Top
lngWidth = oComboBox.Width
If TypeOf oComboBox.Parent Is Frame Then Exit Sub
oldscalemode = oComboBox.Parent.ScaleMode
oComboBox.Parent.ScaleMode = vbPixels
MoveWindow oComboBox.hwnd, lngLeft \ 15, lngTop \ 15, lngWidth \ 15, lNewHeight, 1
oComboBox.Parent.ScaleMode = oldscalemode
End Sub
再用以下代码调用就行了,3000可以更改
Private Sub Command1_Click()
Call setComboHeight(Combo1, 3000)
End Sub
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 setComboHeight(oComboBox As ComboBox, lNewHeight As Long)
Dim oldscalemode As Integer
Dim lngLeft&, lngTop&, lngWidth&
lngLeft = oComboBox.Left
lngTop = oComboBox.Top
lngWidth = oComboBox.Width
If TypeOf oComboBox.Parent Is Frame Then Exit Sub
oldscalemode = oComboBox.Parent.ScaleMode
oComboBox.Parent.ScaleMode = vbPixels
MoveWindow oComboBox.hwnd, lngLeft \ 15, lngTop \ 15, lngWidth \ 15, lNewHeight, 1
oComboBox.Parent.ScaleMode = oldscalemode
End Sub
再用以下代码调用就行了,3000可以更改
Private Sub Command1_Click()
Call setComboHeight(Combo1, 3000)
End Sub
追问
怎么这么乱的。弄不了的
追答
呵呵,改了下
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询