Solved

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

Posted on 2013-05-29
4
190 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 45

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 500 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

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)…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 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