|
-
Jan 26th, 2009, 05:18 PM
#1
Thread Starter
Hyperactive Member
[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
-
Jan 26th, 2009, 05:21 PM
#2
Thread Starter
Hyperactive Member
Re: [2008] Mainmenu1 & InitializeComponent()
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
-
Jan 26th, 2009, 07:21 PM
#3
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?
-
Jan 27th, 2009, 12:50 AM
#4
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|