Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / March 2006

Tip: Looking for answers? Try searching our database.

Inherited BaseForm with ToolStripContainer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Techno_Dex - 29 Mar 2006 16:13 GMT
I am having problems with a BaseForm which contains a ToolStripContainer
which all of my other Forms inherit from.  In my inherited forms I don't
have access at design time to drop ToolStrips or MenuStrips onto the
base.ToolStripContainer Panels (except for the ContentPanel for some
reason).  I have tried various solutions from similar posts but have been
unsuccessful.  I'm hoping someone else can assist in what I'm missing.  I
have included code down below as one of the multiple variations I have
tried.  One of the solutions suggested using a Designer Class which I also
tried without success.

Similar issue but using a Panel
http://www.eggheadcafe.com/ng/microsoft.public.dotnet.framework.windowsforms.des
igntime/Aug2005/post23271766.asp


       ///BaseForm
   public partial class BaseFormProtected : Form

   {

       public BaseFormProtected() : base()

       {

           InitializeComponent();

       }

 [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]

       protected ToolStripContainer ToolStripContainer

       {

           get { return mtscToolStripContainer; }

       }

   }

   partial class BaseFormProtected

   {

       protected System.Windows.Forms.ToolStripContainer
mtscToolStripContainer;

       private void InitializeComponent()

       {

           this.mtscToolStripContainer = new
System.Windows.Forms.ToolStripContainer();

           this.mtscToolStripContainer.SuspendLayout();

           this.SuspendLayout();

           // mtscToolStripContainer

           this.mtscToolStripContainer.ContentPanel.Size = new
System.Drawing.Size(292, 248);

           this.mtscToolStripContainer.Dock =
System.Windows.Forms.DockStyle.Fill;

           this.mtscToolStripContainer.Location = new
System.Drawing.Point(0, 0);

           this.mtscToolStripContainer.Name = "mtscToolStripContainer";

           this.mtscToolStripContainer.Size = new System.Drawing.Size(292,
273);

           this.mtscToolStripContainer.TabIndex = 1;

           this.mtscToolStripContainer.Text = "mtscToolStripContainer";

           // BaseFormProtected

           this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

           this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

           this.ClientSize = new System.Drawing.Size(292, 273);

           this.Controls.Add(this.mtscToolStripContainer);

           this.Name = "BaseFormProtected";

           this.Text = "BaseFormProtected";

           this.mtscToolStripContainer.ResumeLayout(false);

           this.mtscToolStripContainer.PerformLayout();

           this.ResumeLayout(false);

       }

   }

   ///Inherited Form

   public partial class BaseFormProtectedEx : BaseFormProtected

   {

       public BaseFormProtectedEx() : base()

       {

           InitializeComponent();

       }

   }
Kai Bohli - 29 Mar 2006 20:37 GMT
Hi !

This is a shot in the dark, but maybe this article will answer (explain)  your qustion:
http://www.devexpress.com/Support/KnowledgeBase/ShowArticle.xml?kbid=A2912&kbss=
inheritance&prod=-1&tech=X1


HTH

>I am having problems with a BaseForm which contains a ToolStripContainer
>which all of my other Forms inherit from.  In my inherited forms I don't
[quoted text clipped - 111 lines]
>
>    }

Best wishes
Kai Bohli
kaiboe@online.no
Norway
Techno_Dex - 29 Mar 2006 22:30 GMT
I'm not fond of the DevX suggestion since they don't tell you what they are
doing other than modifying a registry key for there own grids.  Running an
unknown *.exe just doesn't cut it for me.  I will keep looking.

FYI:  I came across a post last night discussing this issue with Whidbey...
For good reason, MS creates all custom user controls as one item so
developers using your control don't have access the the individual parts
except through your Designer Code or Properties and methods on the Control.

This poster is having the same issues that I am.
http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.windowsform
s/topic21740.aspx


> Hi !
>
[quoted text clipped - 125 lines]
> kaiboe@online.no
> Norway
Kai Bohli - 29 Mar 2006 22:50 GMT
Hi again !

>I'm not fond of the DevX suggestion since they don't tell you what they are
>doing other than modifying a registry key for there own grids.  Running an
>unknown *.exe just doesn't cut it for me.  I will keep looking.

Yes, I knew that it wouldn't be a solution. I just wanted to point out that MS had disabled Visual
Inheritance.

Best wishes
Kai Bohli
kaiboe@online.no
Norway

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.