Reputation: 153
I saw some threads on this subject, but they are too old, and I wonder if there's something new in .NET 4.5 that allows me to define the Window Class Name for a C# Windows Form. Does anyone know of something new, or has a creative idea? Many thanks.
Clarifying my question, as asked for:
The Window Class Name I'm referring to, is not the window title. It is the class name every window has, and is registered in the OS, so it can identify it and distinguish of other windows. See the Win32 API FindWindow() / RegisterWindow() / WndClass structure for deeper understanding.
The older threads say it's not possible, but they are old.
I hope this helps.
I'd like to add the links to the old posts, maybe they are interesting to someone:
[Registering a custom win32 window class from c#
[c# - Bypassing Windows Forms ClassName name creation to one of my own
Upvotes: 3
Views: 4439
Reputation: 153
Currently, it's impossible to change the Window Class Name for a C# Windows Form, because the C# implementation defines it inside the method 'private string GetFullClassName(string className)
' and does not give a programmer any way to override the value defined inside this method.
Upvotes: 2