Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Which all controls in vb.net associate themselves with the container in designer file?

Posted on 2013-05-29
4
Medium Priority
?
194 Views
Last Modified: 2013-07-03
Which all controls in vb.net associate themselves with the container in designer file?

For example ContextMenuStrip and ToolTip associate themselves with the container as in the code written below but MenuStrip doesn't .why?

The following line in the below code:
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
====================================================================
 'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
        Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem
        Me.A1ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem

Open in new window




Thanks in advance
0
Comment
Question by:hc_gupta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Author Comment

by:hc_gupta
ID: 39206764
I'm sorry but I didn't get your answer.I wanna know as contextMenuStrip get initialized as below code in designer file

Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)


Similarly , which all controls  associate themselves with the containers and get initialized using (Me.components)
0
 
LVL 46

Expert Comment

by:aikimark
ID: 39207456
@hc_gupta

My comment was administrative in nature and not meant to be a solution to your problem.

aikimark -- zone advisor
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 1000 total points
ID: 39249927
The simplest answer is that any control which is not added to Controls collection of a form uses the container to ensure that it gets dispose properly when form closes. There is no list of such controls as far as I know
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question