Jump to content

Visual Basic Enter Basınca Buton Çalışsın


maxi_cex
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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....

Link to comment
Share on other sites

  • 3 hafta sonra ...
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

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...