Results 1 to 3 of 3

Thread: [RESOLVED] Custom tool class

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2013
    Location
    San Francisco, CA
    Posts
    518

    Resolved [RESOLVED] Custom tool class

    Here is a picture of my Solution Explorer pane:

    Name:  2025-03-09_15-40-09.jpg
Views: 627
Size:  48.9 KB

    I've built the solution. Why do some of the class items not have the "VB" icon?

    For example, here is the code for one of the classes that do not have the "VB" icon.

    Code:
    Public Class ToolStripCheckBox
    
        'https://social.msdn.microsoft.com/Forums/vstudio/en-US/78ef28fa-c648-4187-8fb4-1bc5ae234b8b/toolstrip-checkbox?forum=vbgeneral
    
        Inherits ToolStripControlHost
    
        Public Sub New()
            MyBase.New(New CheckBox)
        End Sub
    
        Private ReadOnly Property CheckBoxControl() As CheckBox
            Get
                Return CType(Control, CheckBox)
            End Get
        End Property
    
        'Expose the CheckBoxControl's Checked Property
        Public Property Checked() As Boolean
            Get
                Return CheckBoxControl.Checked
            End Get
            Set(ByVal value As Boolean)
                CheckBoxControl.Checked = value
            End Set
        End Property
    End Class
    Last edited by Mark@SF; Mar 9th, 2025 at 05:31 PM.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,066

    Re: Custom tool class

    That icon indicates that that class is a component. Strictly speaking, that means that it implements the IComponent interface but that generally means that it inherits the Component class. Such classes are supported by the VS designer. Controls are more specialised components and they will have another icon again. Forms are specialised controls that have another dedicated icon.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2013
    Location
    San Francisco, CA
    Posts
    518

    Re: Custom tool class

    Thank you, jmc.

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