Results 1 to 4 of 4

Thread: [2008] Mainmenu1 & InitializeComponent()

  1. #1

    Thread Starter
    Hyperactive Member Always_Confused's Avatar
    Join Date
    Jun 2006
    Location
    Alabama USA
    Posts
    417

    [2008] Mainmenu1 & InitializeComponent()

    Hi All,

    I have a wierd problem where everytime I add a mainmenu I have to edit InitializeComponent().

    I tried to take a shortcut and copy an existing menu and then rename it. Big mistake. If you have done it, do not do it again.

    Anyone have an idea of how to get me back on track?

    I have done a rebuild, closed VB etc.

    Code:
    'frmMain
            '
            Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!)
            Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
            Me.AutoSize = True
            Me.ClientSize = New System.Drawing.Size(902, 513)
            Me.Controls.Add(Me.ToolBar2)
            Me.Controls.Add(Me.ToolBar1)
            Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
            Me.IsMdiContainer = True
            Me.Menu = Me.MainMenu1
            Me.Name = "frmMain"
            Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
            Me.ResumeLayout(False)
            Me.PerformLayout()
    Last edited by Always_Confused; Jan 26th, 2009 at 05:24 PM.
    If you find information helpful from any member, please take a second and rate their post. Its a nice gesture of your appreciation.

    "I have not failed 10,000 times. I have successfully identified 10,000 ways that will not work" Thomas Edison

    Do illiterate people get the full effect of Alphabet Soup?

    ADO FAQ 2005-2008 Masked Textbox Patch FoxPro Date MZ Tools Great Free Tool

  2. #2

    Thread Starter
    Hyperactive Member Always_Confused's Avatar
    Join Date
    Jun 2006
    Location
    Alabama USA
    Posts
    417

    Re: [2008] Mainmenu1 & InitializeComponent()

    It double posted
    If you find information helpful from any member, please take a second and rate their post. Its a nice gesture of your appreciation.

    "I have not failed 10,000 times. I have successfully identified 10,000 ways that will not work" Thomas Edison

    Do illiterate people get the full effect of Alphabet Soup?

    ADO FAQ 2005-2008 Masked Textbox Patch FoxPro Date MZ Tools Great Free Tool

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

    Re: [2008] Mainmenu1 & InitializeComponent()

    You say you have to edit IntiializeComponent but you don't tell us why or what edit(s) you have to make. You also ask how to get back on track but you haven't actually said what exactly is currently off track. Are you saying, without actually saying, that your form won't display in the designer, or that your project won't build, or both, or something else?

    I would think that the thing to do would be to simply delete the variable declaration from your designer code file and then the compiler will flag every place that that variable is used, which you can then delete.

    Also, is there a particular reason you're using a MainMenu instead of a MenuStrip?
    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

  4. #4

    Thread Starter
    Hyperactive Member Always_Confused's Avatar
    Join Date
    Jun 2006
    Location
    Alabama USA
    Posts
    417

    Re: [2008] Mainmenu1 & InitializeComponent()

    I guess I did leave that part out.

    The form loads. What does not load is the main menu but instead the new menu I just created. So, I have to make an edit and change it back to me.MainMenu1
    If you find information helpful from any member, please take a second and rate their post. Its a nice gesture of your appreciation.

    "I have not failed 10,000 times. I have successfully identified 10,000 ways that will not work" Thomas Edison

    Do illiterate people get the full effect of Alphabet Soup?

    ADO FAQ 2005-2008 Masked Textbox Patch FoxPro Date MZ Tools Great Free Tool

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