Results 1 to 2 of 2

Thread: Usercontrol AmbientChanged event in VB.NET

  1. #1

    Thread Starter
    Addicted Member Davor Geci's Avatar
    Join Date
    Sep 2009
    Posts
    224

    Question Usercontrol AmbientChanged event in VB.NET

    Hello,

    what will be the equivalent in vb.net to vb6 AmbientChanged event in usercontrol?

    To use the Me.DesignMode property to get the environmet in what the control is in now.
    My projects:
    Virtual Forms
    VBA Telemetry

  2. #2
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: Usercontrol AmbientChanged event in VB.NET

    Supposedly if you mark a property with the AmbientValue attribute, it should start "inheriting" values from parent containers. I've never tried that attribute myself, so I'm not sure how well it works.

    I'm 99% certain for it to work, you MUST implement the super-secret ShouldSerializeXXX() and ResetXXX() methods. Those are "magic" and must end with the exact name of the property. When they are present, the designer will call them and use them to help it figure out whether it's looking at an ambient, default, or user-set value.

Tags for this Thread

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