Results 1 to 4 of 4

Thread: Custom Control Fits

  1. #1

    Thread Starter
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Custom Control Fits

    Back around 2010, or at least when I was working in VS2010, I created a custom control that inherited panel and did nothing more than set the double buffering property to True.

    Based off of that, I then created a user control that was essentially a custom horizontal scrollbar with a fish as the thumb button. This was that anti flicker panel (which I got from here, actually), with a couple other controls on top of it. That worked fine for a very long time, but just recently it has started causing me trouble. It would work, so long as I didn't look at it. I can't look at the designer anymore. VS2022 utterly refuses to believe that the AntiFlickerPanel class exists, even though it's in the same dll. The code has no problem with it. If I rename the class, then I have to rename the uses of the type in the dll, so it is behaving the way it should, but the designer says that the class doesn't exist, and refuses to show the user control for that reason. When it refuses, I can tell it to ignore and continue, at which point it shows...something. I guess it is showing the controls without showing the panel behind it.

    This has now cascaded onto anything using that user control, because the user control at first refused to show up, then got deleted out of a form designer that was using it, thereby breaking all the code that made use of it.

    It all stems from the form designer refusing to recognize the existence of a class that VS has no problem with. So, what's going on?
    My usual boring signature: Nothing

  2. #2
    Fanatic Member Delaney's Avatar
    Join Date
    Nov 2019
    Location
    Paris, France
    Posts
    846

    Re: Custom Control Fits

    maybe your class has a name which is reserved in VS2022. Do you use your class with Core or Framework Env?
    The best friend of any programmer is a search engine
    "Don't wish it was easier, wish you were better. Don't wish for less problems, wish for more skills. Don't wish for less challenges, wish for more wisdom" (J. Rohn)
    “They did not know it was impossible so they did it” (Mark Twain)

  3. #3

    Thread Starter
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: Custom Control Fits

    Framework, and the name is certainly not reserved. I always use names that are either not words or are compound words. For example, the panel is AntiFlickerPanel and the overall control is SlideFish.
    My usual boring signature: Nothing

  4. #4
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,398

    Re: Custom Control Fits

    I have had this issue too in Visual Studio 2022. I'm not sure what causes it, but I'm interested enough to subscribe to this thread.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

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