Click here to Skip to main content
16,006,006 members
Home / Discussions / C#
   

C#

 
GeneralRe: upload picture problem Pin
Christian Graus5-Jan-08 22:15
protectorChristian Graus5-Jan-08 22:15 
Generalbring out textbox value to microsoft word document Pin
angels7775-Jan-08 15:31
angels7775-Jan-08 15:31 
GeneralRe: bring out textbox value to microsoft word document Pin
Jimmanuel6-Jan-08 2:33
Jimmanuel6-Jan-08 2:33 
GeneralRe: bring out textbox value to microsoft word document Pin
angels7776-Jan-08 7:36
angels7776-Jan-08 7:36 
GeneralRe: bring out textbox value to microsoft word document Pin
Jimmanuel6-Jan-08 7:52
Jimmanuel6-Jan-08 7:52 
GeneralChanging the Icon Pin
ddspliting5-Jan-08 6:21
ddspliting5-Jan-08 6:21 
GeneralRe: Changing the Icon Pin
Paul Conrad5-Jan-08 6:29
professionalPaul Conrad5-Jan-08 6:29 
GeneralRe: Changing the Icon Pin
Luc Pattyn5-Jan-08 6:46
sitebuilderLuc Pattyn5-Jan-08 6:46 
Some comments on applications and icons:

1.
An application typically has two different icons:
- the application itself has an icon at the file level; it gets used by Windows Explorer;
you set it as a project property.
- any form can have an icon; it is a Form property, that you can set through Visual
Designer. It also shows up in the task bar's button (if the Form shows in task bar).

2.
an icon file can hold multiple icons (icons at different sizes), and Windows will pick
one depending on circumstances, so if they do not all look alike, you may get very
confused.

3.
I tend to create icons programmatically; the following code converts a (best small, square) image into a simple icon:

string filename=popupNode.getLongName();
try {
	Bitmap bm=(Bitmap)Image.FromFile(filename);
	if(bm.Width!=32 || bm.Height!=32) {
		bm=new Bitmap(bm, 32, 32);
	}
	Icon icon=Icon.FromHandle(bm.GetHicon());
	bm.Dispose();
	string filename2=Path.ChangeExtension(filename, ".ico");
	Stream stream=new FileStream(filename2, FileMode.Create);
	icon.Save(stream);
	env.output("Created icon "+filename2);
} catch(Exception exc) {
	env.output("Failed to create icon from "+filename);
	env.log(exc);
}


Hope this helps.

Luc Pattyn [Forum Guidelines] [My Articles]

Happy 2008!


GeneralRe: Changing the Icon Pin
ddspliting5-Jan-08 7:05
ddspliting5-Jan-08 7:05 
GeneralRe: Changing the Icon Pin
Luc Pattyn5-Jan-08 8:15
sitebuilderLuc Pattyn5-Jan-08 8:15 
GeneralRe: Changing the Icon Pin
Ed.Poore5-Jan-08 12:37
Ed.Poore5-Jan-08 12:37 
Generaldatabase update insert problems Pin
angels7775-Jan-08 5:29
angels7775-Jan-08 5:29 
GeneralRe: database update insert problems Pin
Christian Graus5-Jan-08 12:46
protectorChristian Graus5-Jan-08 12:46 
Questiondatabase(server) access with a c# program Pin
spieljung5-Jan-08 4:33
spieljung5-Jan-08 4:33 
GeneralRe: database(server) access with a c# program Pin
Gareth H5-Jan-08 5:19
Gareth H5-Jan-08 5:19 
GeneralTalking to a TomTom 520 Pin
Gareth H5-Jan-08 3:43
Gareth H5-Jan-08 3:43 
GeneralRe: Talking to a TomTom 520 Pin
Jimmanuel5-Jan-08 10:30
Jimmanuel5-Jan-08 10:30 
GeneralRe: Talking to a TomTom 520 Pin
Gareth H5-Jan-08 11:22
Gareth H5-Jan-08 11:22 
Generalcombobox problems Pin
angels7775-Jan-08 3:36
angels7775-Jan-08 3:36 
GeneralRe: combobox problems Pin
angels7776-Jan-08 4:07
angels7776-Jan-08 4:07 
GeneralRe: combobox problems Pin
mav.northwind6-Jan-08 19:18
mav.northwind6-Jan-08 19:18 
Questionhow to get rid of "Update requires a valid InsertCommand when passed DataRow collection with new rows."? [modified] Pin
Dg!Mortal5-Jan-08 3:24
Dg!Mortal5-Jan-08 3:24 
GeneralAbout wireless connections Pin
kralece5-Jan-08 2:54
kralece5-Jan-08 2:54 
Generalcombobox events Pin
azza1045-Jan-08 2:36
azza1045-Jan-08 2:36 
AnswerRe: combobox events Pin
Ravi Bhavnani5-Jan-08 5:15
professionalRavi Bhavnani5-Jan-08 5:15 

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.