Jump to content

[vb.net 2005] Duvida txtbox e tecla enter


watt
 Share

Recommended Posts

Boas

Dentro do event_keydown da textbox valida-se se é a techa enter que premida e chamas o evento click do buttao, simples 👍

Jorge

"The Dark Side Clouds Everthing. Impossible To See The Future Is."My rig: Intel Core 2 Quad Q9450 | abit IP35P | 4G Kingston 800 Mhz | XFX GeForce 9800 GX2 1G ddr3 | 2X WD5000AAJS 500Gb Sata 2 | PSU 600W || Caixa El-Diablo | Creative XMod

Link to comment
Share on other sites

No VB.NET 2003/2005 podes também usar a propriedade da form AcceptButton, que define o controlo que vai usar quando clicas no enter.

Por exemplo podes definir que o AcceptButton da form é o btnPesquisar e o CancelButton é o btn fechar. Quando clicas no Enter faz a pesquisa e quando clicas no Esc sai da form.

Com os melhores cumprimentos,

Sérgio Matias

ser.gifsartim.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.