开发者

How to detect if the control is input control or not in windows and overwrite the input

I want to know if the control that got the focus is input control or not using c#

for example

this text box that I am writing the question in it now is input control but the preview text box down there is not because I cant write on it

I need 开发者_运维技巧to detect whether or not it is input control and I want to overwrite what being written there also


You want to edit the text people put in your input fields? Add event listeners on the input controls to the text changed event, and run a method that edits the text in the field.

    public Form1()
    {
        InitializeComponent();
        TextBox textBox = new TextBox();
        textBox.TextChanged += CheckInputText;
    }

    public void CheckInputText(object sender, EventArgs e)
    {
        // Modify text in the input control.
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜