-
Program Icon
Hey how do i set the icon on a form?
i found this
Code:
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(parent));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.icon")));
But i dont understand it and it doesnt work.
Heres how im compiling it
Code:
csc /r:Interface/Interface.dll /t:winexe /win32icon:parent.ico parent.cs
Thanks
-
this?
PHP Code:
using System;
using System.Drawing;
using System.Windows.Forms;
public class SampleForm:Form{
public SampleForm(){
this.Icon=new Icon("brownmonkey.ico");
}
static void Main(){
Application.Run(new SampleForm());
}
}
just... csc SampleForm.cs
-
Re: Program Icon
Quote:
Originally posted by john tindell
Hey how do i set the icon on a form?
i found this
Code:
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(parent));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.icon")));
But i dont understand it and it doesnt work.
This code , gets embedded icon .