Sunday, November 14, 2010

How to make a button click when i click on enter in vb?

I'm doing a search bar in my webbrowser im making in visual basic, it works fine but its annoying because it dosen't do anything when u click the enter key so, if anyone knows who to make the search button click when i click on enter please tell me.How to make a button click when i click on enter in vb?
In 08 there is a bar across the top of the editor with a bunch of drop down items(one for every sub you've created and a few others), select the left one. Set it to ';Form Events'; or something similar(can't remember exactly), then on the right one select ';Keydown'; (or similar), this will create a new function(';Sub';). In that type,

Sub Keydown

if e.keyvalue = keys.enter

' code here

end if

end subHow to make a button click when i click on enter in vb?
Hi,



Depends where the focus lies. If ENTER is the key to activate THAT button...hmm. Perhaps (suggestion) you'd set up a short-cut key?



Just a suggestion, but then, I'm not into vb anymore...



Thor
  • printer won't turn on
  • No comments:

    Post a Comment