Window class name

A

AlexS

How can I set class name for my form in .Net?

For example, my app main form has class name like
WindowsForms10.Window.8.app3

is it possible to change it?

Tx
Alex
 
J

Jon Skeet [C# MVP]

AlexS said:
How can I set class name for my form in .Net?

For example, my app main form has class name like
WindowsForms10.Window.8.app3

is it possible to change it?

Absolutely. Just go into the code and change it just as you would any
other class, and preferrably change the file name too.
 
M

Mattias Sjögren

How can I set class name for my form in .Net?

For example, my app main form has class name like
WindowsForms10.Window.8.app3

is it possible to change it?

Yes you can override the CreateParams property and return a different
name, but if you return "foo" Winforms will still derive a class named
something like WindowsForms10.foo.8.app3.



Mattias
 
A

AlexS

So, it looks like I can't get to RegisterClass or underlying WNDCLASS
structure.

Thanks, I'll have a closer look at CreateParams

What about 2.0?

I have requirement to make all windows with specific class name - don't ask
me why.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top