Results 1 to 3 of 3

Thread: How To Change Class Name Of Forms?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2018

    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?

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002

    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

  3. #3
    You don't want to know.
    Join Date
    Aug 2010

    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


Click Here to Expand Forum to Full Width