-
Mar 6th, 2018, 12:22 AM
#1
Thread Starter
Hyperactive Member
How To Change Class Name Of Forms?
I been searching high and low but can not really seem to find an answer to this question. I am trying to set a name for my form window class name. It is set to this: WindowsForms10.Window.8.app.0.3a25e75_r39_ad1
so my issue is this, I need this classname to be a certain name, I am trying to make an emulator (if you could call it that) for a program that is outdated and the thing is that I am trying to load an old piece of software that looked for the classname of the form of this old software program. So I would need to set the form classnames and controls to what they were originally named.. can this be done?
-
Mar 6th, 2018, 10:56 AM
#2
Re: How To Change Class Name Of Forms?
So, you aren't talking about the class name as it shows up in VS, you are talking about the Windows Class name.
My usual boring signature: Nothing
-
Mar 6th, 2018, 11:09 AM
#3
Re: How To Change Class Name Of Forms?
I don't think .NET exposes this, but you might consider trying to override CreateParams and set the ClassName property.
That property is created before any Control creates its handle, and its properties are used as part of creating the handle. If that doesn't result in changing the actual class name, I'm not sure what will, short of writing your own P\Invoke wrapper, which would be quite difficult.
This answer is wrong. You should be using TableAdapter and Dictionaries instead.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|