开发者

VB6: make default response in InputBox not highlighted?

开发者 https://www.devze.com 2023-01-15 16:32 出处:网络
In VB6 (and earlier), is there a way to have the default resp开发者_StackOverflowonse in an InputBox to be non-highlighted?Check out this tutorial for a custom InputBox in VB.net. Hope it gives you a

In VB6 (and earlier), is there a way to have the default resp开发者_StackOverflowonse in an InputBox to be non-highlighted?


Check out this tutorial for a custom InputBox in VB.net. Hope it gives you a lead as to how to implement such functionality in VB6.


If you don't need to run on Vista or later, you could try this kludge:

Private Sub Form_Load()
    Timer1.Enabled = False
End Sub

Private Sub Command1_Click()
    Timer1.Interval = 250
    Timer1.Enabled = True
    InputBox "no selection", "no sel", "default value"
End Sub

Private Sub Timer1_Timer()
    Timer1.Enabled = False
    SendKeys "{RIGHT}", False
End Sub

To test, create a form with: • Command button • Timer control, and use default names.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号