So here's what I'm trying to achieve. I have a simple chat winforms application that I want to be put on top of other applications that are fullscreen, I don't want it to take focus but I'd like it to accept the user input in the text box. I've achieved the first part so far and my chat app stays on top of other apps without taking its focus. Here's what I've used:
const int WS_EX_NOACTIVATE = 0x8000000;
protected override CreateParams CreateParams
{
get
{
CreateParams ret = base.CreateParams;
ret.ExStyle |= WS_EX_NOACTIVATE;
return ret;
}
}
public Form1()
{
InitializeComponent();
TopMost = true;
}
Now the problem is that I can't write anything into the textbox. All buttons work fine, I can click them and they trigger events, but the textbox doesn't take any input.