VB中textbox里面显示的内容怎么设置成只能复制不能修改
展开全部
简单的可以直接 Text.Locked = True,但是不能限制右键的粘贴。
如果要连右键粘贴也限制的可试试这样
Dim Str As String
Private Sub Command1_Click()
Str = "123"
Text.Text = Str
End Sub
Private Sub Form_Load()
Str = "abc"
Text.Text = Str
End Sub
Private Sub Text_Change()
Text.Text = Str
End Sub
如果要连右键粘贴也限制的可试试这样
Dim Str As String
Private Sub Command1_Click()
Str = "123"
Text.Text = Str
End Sub
Private Sub Form_Load()
Str = "abc"
Text.Text = Str
End Sub
Private Sub Text_Change()
Text.Text = Str
End Sub
2013-01-06
展开全部
Dim s As String
Private Sub Form_Load()
s = Text1.Text
End Sub
Private Sub Text1_Change()
Text1.Text = s
Text1.SelStart = Len(Text1.Text)
End Sub
Private Sub Form_Load()
s = Text1.Text
End Sub
Private Sub Text1_Change()
Text1.Text = s
Text1.SelStart = Len(Text1.Text)
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询