Click here to Skip to main content
15,909,829 members
Home / Discussions / C#
   

C#

 
GeneralRe: how can I get ID of each control in a form ? Pin
J4amieC8-Oct-07 22:17
J4amieC8-Oct-07 22:17 
GeneralRe: how can I get ID of each control in a form ? Pin
Scott Dorman8-Oct-07 23:34
professionalScott Dorman8-Oct-07 23:34 
GeneralRe: how can I get ID of each control in a form ? Pin
whale849-Oct-07 2:08
whale849-Oct-07 2:08 
GeneralRe: how can I get ID of each control in a form ? Pin
Scott Dorman9-Oct-07 7:45
professionalScott Dorman9-Oct-07 7:45 
GeneralRe: how can I get ID of each control in a form ? Pin
Martin#8-Oct-07 23:15
Martin#8-Oct-07 23:15 
QuestionICON!!! Pin
MasterSharp8-Oct-07 13:53
MasterSharp8-Oct-07 13:53 
AnswerRe: ICON!!! Pin
MasterSharp8-Oct-07 13:56
MasterSharp8-Oct-07 13:56 
GeneralRe: ICON!!! Pin
Luc Pattyn8-Oct-07 14:03
sitebuilderLuc Pattyn8-Oct-07 14:03 
Hi,

two comments:

1.
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.

2.
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]


this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google


GeneralRe: ICON!!! Pin
MasterSharp8-Oct-07 14:11
MasterSharp8-Oct-07 14:11 
GeneralRe: ICON!!! Pin
Luc Pattyn8-Oct-07 14:24
sitebuilderLuc Pattyn8-Oct-07 14:24 
GeneralRe: ICON!!! Pin
MasterSharp8-Oct-07 14:29
MasterSharp8-Oct-07 14:29 
GeneralRe: ICON!!! Pin
Luc Pattyn8-Oct-07 15:32
sitebuilderLuc Pattyn8-Oct-07 15:32 
QuestionDataGridView to DataSet Pin
udikantz8-Oct-07 13:42
udikantz8-Oct-07 13:42 
QuestionFileSystemWatcher to SQL 2005 Pin
solutionsville8-Oct-07 13:11
solutionsville8-Oct-07 13:11 
AnswerRe: FileSystemWatcher to SQL 2005 Pin
ChrisKo8-Oct-07 14:20
ChrisKo8-Oct-07 14:20 
AnswerRe: FileSystemWatcher to SQL 2005 Pin
solutionsville8-Oct-07 15:39
solutionsville8-Oct-07 15:39 
QuestionEdit the Registry keys Name/Type/Data fields. Pin
Dino2Dino8-Oct-07 11:51
Dino2Dino8-Oct-07 11:51 
AnswerRe: Edit the Registry keys Name/Type/Data fields. Pin
Scott Dorman8-Oct-07 12:11
professionalScott Dorman8-Oct-07 12:11 
QuestionRe: Edit the Registry keys Name/Type/Data fields. Pin
Dino2Dino8-Oct-07 13:14
Dino2Dino8-Oct-07 13:14 
AnswerRe: Edit the Registry keys Name/Type/Data fields. Pin
Scott Dorman8-Oct-07 13:23
professionalScott Dorman8-Oct-07 13:23 
GeneralRe: Edit the Registry keys Name/Type/Data fields. Pin
Dino2Dino8-Oct-07 13:30
Dino2Dino8-Oct-07 13:30 
GeneralRe: Edit the Registry keys Name/Type/Data fields. Pin
Dave Kreskowiak8-Oct-07 13:48
mveDave Kreskowiak8-Oct-07 13:48 
GeneralRe: Edit the Registry keys Name/Type/Data fields. Pin
Dino2Dino9-Oct-07 10:16
Dino2Dino9-Oct-07 10:16 
GeneralRe: Edit the Registry keys Name/Type/Data fields. Pin
Dave Kreskowiak9-Oct-07 11:47
mveDave Kreskowiak9-Oct-07 11:47 
GeneralRe: Edit the Registry keys Name/Type/Data fields. Pin
Dino2Dino12-Oct-07 10:59
Dino2Dino12-Oct-07 10:59 

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.