View Full Version : کار با کلید ترکیبی ctrl+A
mamali5030
یک شنبه 03 اسفند 1393, 11:38 صبح
به نام خدا
سلام دوستان
چطور میتونیم کلید ترکیبی ctrl+A که برای انتخاب کل متن هست رو واسه یه textbox فعال کنیم؟:متفکر::متفکر:
setroyd
دوشنبه 04 اسفند 1393, 16:25 عصر
Private Sub Form_Load()
KeyPreview = True
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
Const ASC_CTRL_A As Integer = 1
Dim txt As TextBox
If KeyAscii = ASC_CTRL_A Then
If TypeOf ActiveControl Is TextBox Then
Set txt = ActiveControl
txt.SelStart = 0
txt.SelLength = Len(txt.Text)
End If
End If
End Sub
vBulletin® v4.2.5, Copyright ©2000-1403, Jelsoft Enterprises Ltd.