maxi_cex Posted April 10, 2013 Share Posted April 10, 2013 (edited) Arkadaşlar visual studio, visual basic öğrenmeye yeni başlıyorum. Enter tuşuna basınca buton çalışsın. Bunu nasıl yapabilirim yardım eder misiniz? Edited April 10, 2013 by maxi_cex Quote Link to comment Share on other sites More sharing options...
arestos Posted April 10, 2013 Share Posted April 10, 2013 Kodu Yazacagin Buttonun KeyPress'ine If e.KeyChar = Chr(13) Then MsgBox ("Islemi Yap") End If Quote Link to comment Share on other sites More sharing options...
maxi_cex Posted April 10, 2013 Author Share Posted April 10, 2013 yardımın için çok teşekkür ederim. olmadı ben bir yerde hata yapıyorum galiba. Örneğin Bir tane "textbox1" var buraya yazdığım metni "messagebox" ile göstersin diyorum butona tıklayarak bunu yapıyorum. Ben enter tuşuna basınca direk buton çalışsın istiyorum. Bu konuda çok acemi olduğum için biraz daha yardımcı olursan memnun olurum. Quote Link to comment Share on other sites More sharing options...
maxi_cex Posted April 10, 2013 Author Share Posted April 10, 2013 Sorunu çözdüm teşekkür ederim. Textbox1 in keydown içerisine aşağıdaki kodları yazdım oldu. If e.KeyCode = Keys.Enter Then Button1.PerformClick() end if Quote Link to comment Share on other sites More sharing options...
Berdush_03 Posted April 10, 2013 Share Posted April 10, 2013 Sorunu çözdüm teşekkür ederim. Textbox1 in keydown içerisine aşağıdaki kodları yazdım oldu. If e.KeyCode = Keys.Enter Then Button1.PerformClick() end if Öyle kullanışlı olmaz. Örneğin: Textbox kutusunu boş geçtiğiniz halde bile mesaj kutusu açılır ve boş mesaj verir. Farklı yollar bulmanız gerekir. Textbox kutusunu denetletmeniz gerekir. Kutu boşsa mesaj verme gibi.... Quote Link to comment Share on other sites More sharing options...
arestos Posted April 25, 2013 Share Posted April 25, 2013 if textbox1.text > "" Then If e.KeyCode = Keys.Enter Then Button1.PerformClick() end if End If Sorunu çözdüm teşekkür ederim. Textbox1 in keydown içerisine aşağıdaki kodları yazdım oldu. If e.KeyCode = Keys.Enter Then Button1.PerformClick() end if Quote Link to comment Share on other sites More sharing options...
DCFroMLiFe Posted May 1, 2013 Share Posted May 1, 2013 (edited) Çözüm bulunmuş fakat bir önerim var; Formun propertiesindeki "AcceptButton" a göz atmalısınız Edited May 1, 2013 by DCFroMLiFe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.