Click here to Skip to main content
15,914,359 members
Home / Discussions / C#
   

C#

 
GeneralRe: generic report writer Pin
Paul Conrad3-Aug-07 3:35
professionalPaul Conrad3-Aug-07 3:35 
QuestionchildNode of mshtml.HTMLDocumentClass Pin
Michael Sync1-Aug-07 15:18
Michael Sync1-Aug-07 15:18 
AnswerRe: childNode of mshtml.HTMLDocumentClass Pin
Michael Sync5-Aug-07 23:49
Michael Sync5-Aug-07 23:49 
QuestionBlock pages Pin
daku11-Aug-07 13:42
daku11-Aug-07 13:42 
AnswerRe: Block pages Pin
Michael Sync1-Aug-07 15:22
Michael Sync1-Aug-07 15:22 
QuestionAdd Icon Resource (Windows Forms app) Pin
peterchen1-Aug-07 12:57
peterchen1-Aug-07 12:57 
AnswerRe: Add Icon Resource (Windows Forms app) Pin
Luc Pattyn1-Aug-07 14:58
sitebuilderLuc Pattyn1-Aug-07 14:58 
AnswerRe: Add Icon Resource (Windows Forms app) Pin
Martin#2-Aug-07 0:26
Martin#2-Aug-07 0:26 
Hello,

Like Luc suggested:
you can add an .ico file to your project, then set the build action to "embedded
resource".


To instanciate the Icon, you would have to use following constructor:
http://msdn2.microsoft.com/de-de/library/b5bzkwt9(VS.80).aspx[^]
The parameters are
1) A Type, which represents the Assembly in which the ressource is expected.
2) A string, which represents the name of the ressource.

To Draw the Icon, you could use: Graphics.DrawIcon

private System.Drawing.Icon yourIcon = null;
protected override void OnPaint(PaintEventArgs e)
{
    if(yourIcon==null)
    {
        yourIcon =  new Icon(typeof(YourNameSpace.ExampleControlClass), "YourIconName");
    }

    if(yourIcon!=null)
    {
        e.Graphics.DrawIcon(yourIcon, 10,10);
    }
    base.OnPaint (e);
}






All the best,

Martin

GeneralRe: Add Icon Resource (Windows Forms app) Pin
peterchen8-Aug-07 10:41
peterchen8-Aug-07 10:41 
GeneralRe: Add Icon Resource (Windows Forms app) Pin
Martin#8-Aug-07 19:56
Martin#8-Aug-07 19:56 
QuestionMigration from Visual Studio 2003 CF 1.0 into Visual Studio 2005 CF 2.0 Pin
Hani071-Aug-07 12:29
Hani071-Aug-07 12:29 
AnswerRe: Migration from Visual Studio 2003 CF 1.0 into Visual Studio 2005 CF 2.0 Pin
Luc Pattyn1-Aug-07 12:38
sitebuilderLuc Pattyn1-Aug-07 12:38 
QuestionVIRTUAL CD OR MOUNT VIRTUAL DRIVE Pin
Shargon_851-Aug-07 10:59
Shargon_851-Aug-07 10:59 
AnswerRe: VIRTUAL CD OR MOUNT VIRTUAL DRIVE Pin
Thomas Stockwell4-Aug-07 12:52
professionalThomas Stockwell4-Aug-07 12:52 
QuestionVB6 to C# Question Pin
jay in CT1-Aug-07 10:34
jay in CT1-Aug-07 10:34 
AnswerRe: VB6 to C# Question Pin
Judah Gabriel Himango1-Aug-07 11:51
sponsorJudah Gabriel Himango1-Aug-07 11:51 
GeneralRe: VB6 to C# Question Pin
jay in CT2-Aug-07 2:03
jay in CT2-Aug-07 2:03 
GeneralRe: VB6 to C# Question Pin
Judah Gabriel Himango2-Aug-07 4:36
sponsorJudah Gabriel Himango2-Aug-07 4:36 
QuestionBinary conversion , Help please!! Pin
Fara761-Aug-07 10:22
Fara761-Aug-07 10:22 
AnswerRe: Binary conversion , Help please!! Pin
Luc Pattyn1-Aug-07 12:42
sitebuilderLuc Pattyn1-Aug-07 12:42 
AnswerRe: Binary conversion , Help please!! Pin
pmarfleet1-Aug-07 12:52
pmarfleet1-Aug-07 12:52 
GeneralRe: Binary conversion , Help please!! Pin
Fara761-Aug-07 13:19
Fara761-Aug-07 13:19 
AnswerRe: Binary conversion , Help please!! Pin
Vega021-Aug-07 19:37
Vega021-Aug-07 19:37 
GeneralRe: Binary conversion , Help please!! Pin
Fara762-Aug-07 15:54
Fara762-Aug-07 15:54 
QuestionAspect Oriented Programing in C# Pin
Kevin Kinnett1-Aug-07 8:33
Kevin Kinnett1-Aug-07 8:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.