Icon does not appear.

  • Thread starter Thread starter Brahm
  • Start date Start date
B

Brahm

Hello,
I have an application with a main class subclassing the
System.Windows.Form and i changed the Icon setting for the application
to point to a different icon file. Now, when my application runs, the
icon appearing in the upper left hand side of the window frame is the
default one and not the one i selected. I went back and checked after
compilation and the properties for the form indicate the new icon name i
designated but the application does not display the icon when it runs or
even in design mode. The icon does appear when i do Alt-Tab, but the one
in the control box or the one that shows up when i minimize the window
is just a blank icon.
Here is the line of code that the VS .NET C# has created:
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(728, 593);
this.Controls.Add(this.statusBar);
this.Controls.Add(this.lstUserFeedback);
this.Controls.Add(this.tabControl1);
this.Icon =
((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Menu = this.myMainMenu;
this.Name = "MyApp";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
this.StartPosition =
System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "MyApp";
this.tabControl1.ResumeLayout(false);

Any ideas?

Thanks, Please tell me how to reply...
BRAHM
 
Hi,

You should change both the application icon as well as the form one,they
are not the same.

Cheers,
 
Back
Top