Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 190271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:14:32+00:00 2026-05-11T16:14:32+00:00

In our IDE, for example, Visual Studio, if we display the properties of a

  • 0

In our IDE, for example, Visual Studio, if we display the properties of a System.Windows.Forms.Button control, we see some properties that expose anoter set of properties. For example: FlatAppearance, Font, Location, Margin, etcetera.

I would like to do something similar in a custom control.

I know the code behind is wrong, but here is an example of what I´m trying to do:

Public Class StateOfMyCustomControl

    Public Enum EnumVisibility
        Visible
        NonVisible
    End Enum

    Public Enum EnumEventManagement
        Automatic
        Manual
    End Enum

    Private mAssociatedControl As MyCustomControl
    Private mVisibility As EnumVisibility
    Private mEventManagement As EnumEventManagement

    Public Sub New(ByVal AssociatedControl As MyCustomControl)
        mAssociatedControl = AssociatedControl
    End Sub

    Public Property Visibility() As EnumVisibility
        Get
            Return mVisibility
        End Get
        Set(ByVal value As EnumVisibility)

            mVisibility = value

            mAssociatedControl.Visible = False
            If mVisibility = EnumVisibility.Visible Then
                mAssociatedControl.Visible = True
            End If

        End Set
    End Property

    Public Property EventManagement() As EnumEventManagement
        Get
            Return mEventManagement
        End Get
        Set(ByVal value As EnumEventManagement)
            mEventManagement = value
        End Set
    End Property

End Class

Public Class MyCustomControl

    ' ...

    Private mState As StateOfMyCustomControl

    Public Sub New()
        mState = New StateOfMyCustomControl(Me)
    End Sub

    Public Property State() As StateOfMyCustomControl
        Get
            Return mState
        End Get
        Set(ByVal value As StateOfMyCustomControl)
            mState = value
        End Set
    End Property

    ' ...

End Class

In my IDE, in the properties window of my custom control, I would like to see my property State, with the possibility of display it to set the properties Visibility and EventManagement.

Thanks very much

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T16:14:32+00:00Added an answer on May 11, 2026 at 4:14 pm

    You need to tell it to use ExpandableObjectConverter (or a custom converter) for StateOfMyCustomControl. In C#, this is:

    [TypeConverter(typeof(ExpandableObjectConverter))]
    public class StateOfMyCustomControl {...}
    

    However you apply attributes in VB, do that ;-p

    Possibly:

    <TypeConverter(GetType(ExpandableObjectConverter))> _
    Public Class StateOfMyCustomControl
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our dev shop currently uses Visual SourceSafe. We all know how that could end
We've recently upgraded from VS2008 to VS2010. The conversion of our vb.net Windows Forms
Immediately after we upgraded to visual studio 2010 and the 4.0 framework our trunk
Our team is creating a new recruitment workflow system to replace an old one.
Our ASP.NET 3.5 website running on IIS 6 has two teams that are adding
Our EPOS system copies data by compressing the database into a zip file, and
We use Visual Studio 2005 here, and in an attempt to improve the documentation
I'm documenting the company framework for use with our default IDE (Netbeans). It's normal
We are told that we should implement hashCode() for our classes but most people
When debugging a VB6 application, I have noticed that the VB6 IDE keeps any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.