Click here to Skip to main content
15,888,019 members
Home / Discussions / C#
   

C#

 
GeneralRe: Ref Key word Pin
Corinna John11-Jan-05 21:02
Corinna John11-Jan-05 21:02 
GeneralRe: Ref Key word Pin
leppie12-Jan-05 6:22
leppie12-Jan-05 6:22 
GeneralRe: Ref Key word Pin
Corinna John12-Jan-05 7:19
Corinna John12-Jan-05 7:19 
GeneralHangs while opening word in C# Pin
itssuk11-Jan-05 18:37
itssuk11-Jan-05 18:37 
GeneralRe: Hangs while opening word in C# Pin
Dave Kreskowiak12-Jan-05 4:29
mveDave Kreskowiak12-Jan-05 4:29 
QuestionWhen will be the missing APIs be available with .NET FCL? Pin
Salil Khedkar11-Jan-05 18:25
Salil Khedkar11-Jan-05 18:25 
GeneralEBCDIC to ASCII Pin
Talktorajeev11-Jan-05 18:13
Talktorajeev11-Jan-05 18:13 
GeneralDisplaying an icon in a PictureBox control Pin
Member 131681311-Jan-05 17:53
Member 131681311-Jan-05 17:53 
I have a picture box which is 48x48 in size and I want to set the image at runtime using a System.Drawing.Icon object which I have previously loaded.

I wish to know how I can display the icon in the picture box so the quality and resolution is the same as if I selected an icon file in design time and assigned this to the PictureBox.

At present I am converting the icon object to a bitmap (iconObject.ToBitmap()) and using this to populate the PictureBox. However this results is a grainy/poor quality image appearing in the picture box.

If I set the image property of the PictureBox at design time by selecting an icon file (*.ico) the image displayed is very crisp and clean and is at the highest resolution the icon supports.

I guess that I need to do some sort of image conversion from the icon object to some sort of high resolution image object. The .ToBitmap() method in the Icon object is obviously not sufficient.

Can anyone help please?






Can you tell me how I should be assigning icons to the image property so they are displayed at the high resolution I get when doing it in design time?



Ben
GeneralInsert marks Pin
RockRock11-Jan-05 17:30
RockRock11-Jan-05 17:30 
QuestionCan someone suggest?... Pin
Synthia211-Jan-05 17:02
Synthia211-Jan-05 17:02 
AnswerRe: Can someone suggest?... Pin
itssuk11-Jan-05 18:40
itssuk11-Jan-05 18:40 
QuestionNAnt - how to get this working? Pin
Chua Wen Ching11-Jan-05 15:15
Chua Wen Ching11-Jan-05 15:15 
AnswerRe: NAnt - how to get this working? Pin
Nick Parker11-Jan-05 16:50
protectorNick Parker11-Jan-05 16:50 
GeneralRe: NAnt - how to get this working? Pin
Chua Wen Ching11-Jan-05 21:31
Chua Wen Ching11-Jan-05 21:31 
Generalqueue listener Pin
Anonymous11-Jan-05 10:20
Anonymous11-Jan-05 10:20 
Generalgetting inner Xml Nodes Pin
Sylesh11-Jan-05 10:18
Sylesh11-Jan-05 10:18 
GeneralRe: getting inner Xml Nodes Pin
Syed Abdul Khader11-Jan-05 14:23
Syed Abdul Khader11-Jan-05 14:23 
GeneralRe: getting inner Xml Nodes Pin
Sylesh12-Jan-05 2:44
Sylesh12-Jan-05 2:44 
GeneralRe: getting inner Xml Nodes Pin
Syed Abdul Khader12-Jan-05 14:08
Syed Abdul Khader12-Jan-05 14:08 
Generalgetting inner Xml Nodes Pin
Sylesh11-Jan-05 10:16
Sylesh11-Jan-05 10:16 
Generalbrowsable in Propertygrid Pin
GoodQuestion11-Jan-05 9:46
GoodQuestion11-Jan-05 9:46 
GeneralRe: browsable in Propertygrid Pin
Robert Rohde11-Jan-05 10:10
Robert Rohde11-Jan-05 10:10 
GeneralRe: browsable in Propertygrid Pin
GoodQuestion13-Jan-05 4:14
GoodQuestion13-Jan-05 4:14 
GeneralSorting a TreeView Control. Pin
stan2811-Jan-05 9:14
stan2811-Jan-05 9:14 
GeneralMemory Managment Pin
bwagz11-Jan-05 8:51
bwagz11-Jan-05 8:51 

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.