| 发表于:2007-08-23 12:49:171楼 得分:20 |
const cb_getitemheight = &h154 const cb_setitemheight = &h153 const cb_showdropdown = &h14f private declare function sendmessage lib "user32 " alias "sendmessagea " (byval hwnd as long, byval wmsg as long, byval wparam as long, lparam as any) as long 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() dim i as long for i = 1 to 50 combo1.additem format(i, "00000 ") next i combo1.listindex = 0 dim lngcmblineheiht as long dim lngcountline as long me.scalemode = vbpixels with combo1 lngcmblineheiht = sendmessage(.hwnd, cb_getitemheight, 0, byval 0) '设定下拉共有几行 lngcountline = 25 '行 movewindow .hwnd, .left, .top, .width, lngcmblineheiht * (lngcountline + 2), 1 end with end sub | | |
|