-1

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

Muhammad Nour
  • 2,109
  • 2
  • 17
  • 24
  • Would a check box or radio button be considered input? They can be edited by the user, but they do not receive text... – therealmitchconnors Jun 17 '11 at 15:23
  • no only looking for text input thats why I have tagged the question with textinput!! – Muhammad Nour Jun 17 '11 at 17:12
  • -1, what you are asking is near impossible, you would have to hack in their programming and change the values recorded in the memory of that program. Maybe if you would say why you need this feature, but I don't get the idea that will motivate people to help you. – MrFox Jun 19 '11 at 07:22
  • hahahaha, what are you taking about!!!!!! then how Microsoft IME working ??? and how all the other smart input for the Japanese and other Asian languages working??? there a lot of closed source software that is doing what I am taking about please be aware before you add comments and other things – Muhammad Nour Jun 19 '11 at 12:27
  • for microsoft IME engine it detect the input in any place and popup a list of the suitable Japanese words in any place that considered as text input!!!!!!!!!!!!!! and I do not think they are hacking any memory or any thing like what you have said!! – Muhammad Nour Jun 19 '11 at 12:31

1 Answers1

0

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.
    }
MrFox
  • 4,852
  • 7
  • 45
  • 81