如何不用API使文本框属性只读?
以下两种方法都可实现:
Private Sub Text1_GotFocus()
Text1.Locked = True
End Sub
Private Sub Text1_LostFocus()
Text1.Locked = False
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, _
Shift As Integer)
KeyCode = 0
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
版权声明:本文由驱动中国整理发布,转载需注明出处与原文链接。如有疑问请联系
editor@qudong.com。
本文价值
★★★★★
—
成为第一个评分的人
登录后为本文打分
评论加载中…