首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

combobox 怎样实现输入字符上拉列表即出现匹配的项

2012-11-10 
combobox 怎样实现输入字符下拉列表即出现匹配的项各位高手,最近我编了一个简易的浏览器,用到了combobox

combobox 怎样实现输入字符下拉列表即出现匹配的项
各位高手,最近我编了一个简易的浏览器,用到了combobox 我想在实现输入字符下拉列表即自动出现以前输入过的匹配的项
当在下拉列表中选中它时自动浏览指定网页,请高手指教,谢谢了~~~~

[解决办法]

VB code
'This program needs a textbox ('Text1') on a formPrivate Const SHACF_AUTOAPPEND_FORCE_OFF = &H80000000Private Const SHACF_AUTOAPPEND_FORCE_ON = &H40000000Private Const SHACF_AUTOSUGGEST_FORCE_OFF = &H20000000Private Const SHACF_AUTOSUGGEST_FORCE_ON = &H10000000Private Const SHACF_DEFAULT = &H0Private Const SHACF_FILESYSTEM = &H1Private Const SHACF_URLHISTORY = &H2Private Const SHACF_URLMRU = &H4Private Const SHACF_USETAB = &H8Private Const SHACF_URLALL = (SHACF_URLHISTORY Or SHACF_URLMRU)Private Const GW_CHILD = 5Private Declare Sub SHAutoComplete Lib "shlwapi.dll" (ByVal hwndEdit As Long, ByVal dwFlags As Long)Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As LongPrivate Sub Form_Load()    SHAutoComplete GetWindow(Combo1.hwnd, GW_CHILD), SHACF_AUTOAPPEND_FORCE_ON Or SHACF_URLALLEnd Sub 

热点排行