Hi All,
In VC++/MFC, I can create a CButton instance for a button control and call
SetIcon on the instance passing it the result of LoadIcon.
Can't I do a similar thing in C#?
--
Regards,
Richard
BTW, I got an answer to this before but forgot it. I went back to Outlook
Express to look it up, but only my question was still posted. The
response(s) was gone.

Signature
Regards,
Richard
I can resist everything except temptation
Lord Darlington in "Lady Windermere's Fan" by Oscar Wilde
Wayne E. Winder (MSFT) - 29 Oct 2003 22:25 GMT
Yes, you can set an icon in C#.
The button object has an Image property that you can set with a
System.Drawing.Image value. One way to do this is to embed the image as a
resource in your C# project and assign the image to the button property:
this.button1.Image = (System.Drawing.Image)
(resources.GetObject(<file name>);
You can have Visual Studio create code that works by using the form
designer to add the button, select it, then use the Properties window to
select a file to assign to the Image property. VS writes the code that
accomplishes this action into the "code behind" the form in the hidden
section "Windows Form Designer generated code".
I hope that helps you,
Wayne Winder
Microsoft Corp.
--------------------
>From: "Richard Muller" <RichardLMullerDELETE@comcast.net>
>Subject: Attaching an icon to a button in C#, How to?
[quoted text clipped - 25 lines]
>Express to look it up, but only my question was still posted. The
>response(s) was gone.
--
This posting is provided "AS IS" with no warranties, and confers no rights.