Click here to Skip to main content
15,905,607 members

Comments by Majid Yaghoubi (Top 4 by date)

Majid Yaghoubi 25-Oct-13 17:38pm View    
Deleted
please attention :

There is no code same :

<pre lang="c#">this.component.add(this.Main);</pre>

When i add this line , This error occurred :
Object reference not set to an instance of an object.
Look at this picture

this exception occurred when I build App.
If i add this line :

<pre lang="c#">this.controls.add(this.Main);</pre>

I see 2 Errors in list error :
Error 1 : The best overloaded method match for 'System.Windows.Forms.Control.ControlCollection.Add(System.Windows.Forms.Control)' has some invalid arguments
Error 2 : Argument 1: cannot convert from 'System.Windows.Forms.ToolStripMenuItem' to 'System.Windows.Forms.Control'

This is my Designer code about Menu strip (Main):

<pre lang="cs"> this.Main = new System.Windows.Forms.ToolStripMenuItem(); </pre>

And some code for define sub Menus. I'm surprised that Why don't exist menu strip icon under my form in Form.cs[Design] windows.
href="https://skydrive.live.com/redir?resid=B11CDB47B864DBDF!1033&authkey=!APRviPWj-OLxgWg&v=3">Look at this picture

And this
Majid Yaghoubi 25-Oct-13 16:43pm View    
No , There is no error when I build App and My App is run Properly . But Menu strip is not visible . even menu strip is not under my form in Form.cs[Design] windows.
Majid Yaghoubi 25-Oct-13 10:47am View    
no, unfortunately its not work !
Majid Yaghoubi 25-Oct-13 9:21am View    
thx , but where should i write this ?
I add it in Designer.cs but i get this exception :
Object reference not set to an instance of an object.