试试这样
Dim tx As WinForm.TextBox = e.Form.Controls("TextBox1")tx.ReadOnly = BooleanEnum.TrueDim clr As Color = Color.Redtx.ForeColor = clrtx.VisualStyle = 0