C# – .Net winform property says Visible but I can’t see it

cnetwinforms

I have a weird situation where I open a form from my application, hide it, and when I try to show it a second time, the Visible property says true, TopMost true also, location is correct, yet I can't see it.

Any ideas where and what to look at to work out what the problem is?

(Note: there may be issues with event handlers/delegate, but I'm not too sure where to start)

UPDATE – I set ShowInTaskbar to true – and I see it in the taskbar, but no way to bring it to front, and right click on the taskbar button does nothing. Alt-Tab neither. Doesn't show up in TaskManager.

Tried Crack.NET, but can't find any properties which let me get 'into' the object instance. .Net Memory Profiler doesn't help for this, I believe, and Winspector I'm not sure what to do with.

UPDATE2 – I lied, it's not directly a WinForm, I was inheriting from a custom class which in turn inherits from WinForm. I tried inheriting directly from Form and it works. So now I've got to go and look in the code of the custom class. I'll keep you posted…

Best Answer

Could it be out of the screen boundaries? (that is, moved out).

Use Spy++ or Winspector and try to find this missing window and see exactly where/why it's hiding.

Related Topic