急!如何用SendMessage向ComboBox发送OnEnter消息或者让他下拉的消息(20分)

  • 主题发起人 主题发起人 bmcheng
  • 开始时间 开始时间
使用<br>SendMessage(ComboBox1.Handle,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CB_SHOWDROPDOWN, &nbsp; &nbsp; &nbsp; &nbsp;//显示下拉框<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// wParam: True--- Show;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;False -- Hide; <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0);<br>
 
可以不用API<br><br>&nbsp; with ComboBox do<br>&nbsp; begin<br>&nbsp; &nbsp; SetFocus;<br>&nbsp; &nbsp; DroppedDown := True;<br>&nbsp; end;<br>
 
&nbsp; &nbsp;combobox1.Perform(cb_showdropdown,1,0);<br>--show the combobox dropdownlist<br>&nbsp; &nbsp; combobox1.Perform(cb_showdropdown,0,0);<br>--hide the comobobox dropdownlist.
 
多人接受答案了。
 
各位,通过以上的方法都可以显示出下拉框,可是鼠标却没有了<br>这如何是好,还请给位指点
 
后退
顶部