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

C#

 
AnswerRe: Could you help me to suggest a book for immgrating from C++ to C#, what about Accelerated C# or Illustrated C#,Pro C# 2008 and the .NET 3.5 Platform Pin
Christian Graus2-Mar-09 14:19
protectorChristian Graus2-Mar-09 14:19 
GeneralRe: Could you help me to suggest a book for immgrating from C++ to C#, what about Accelerated C# or Illustrated C#,Pro C# 2008 and the .NET 3.5 Platform Pin
Dracula Wang2-Mar-09 14:34
Dracula Wang2-Mar-09 14:34 
GeneralRe: Could you help me to suggest a book for immgrating from C++ to C#, what about Accelerated C# or Illustrated C#,Pro C# 2008 and the .NET 3.5 Platform Pin
Christian Graus2-Mar-09 15:03
protectorChristian Graus2-Mar-09 15:03 
GeneralRe: Could you help me to suggest a book for immgrating from C++ to C#, what about Accelerated C# or Illustrated C#,Pro C# 2008 and the .NET 3.5 Platform Pin
Shyam K Pananghat2-Mar-09 22:21
Shyam K Pananghat2-Mar-09 22:21 
QuestionLoading images into Image list - Problem Pin
S K Y2-Mar-09 14:14
S K Y2-Mar-09 14:14 
AnswerRe: Loading images into Image list - Problem Pin
Luc Pattyn2-Mar-09 14:34
sitebuilderLuc Pattyn2-Mar-09 14:34 
GeneralRe: Loading images into Image list - Problem Pin
S K Y2-Mar-09 14:54
S K Y2-Mar-09 14:54 
AnswerRe: Loading images into Image list - Problem Pin
Luc Pattyn2-Mar-09 15:34
sitebuilderLuc Pattyn2-Mar-09 15:34 
Hi,

1.
I don't know whether you have a file lock problem; if you have, do as I suggested.

2.
You should not remove images from a collection such as an ImageList, since that shifts some of them in the collection, modifying all the higher indices.

3.
If you are afraid the same image might be loaded several times (taking time and memory),
then create an image cache, e.g. use a Dictionary< string, Image> that holds the image together with its filename. Then loading an image becomes a two-step thing:
A) look in cache using myDictionary[filename], if not null use it; else
B) load the image and store it in myDictionary[filename], then use it.

4.
If you don't permanently need the images themselves, say you only need thumbnails, then of course there is no need to keep the images, just keep the thumbnails, hence:
A) look in cache using myDictionary[filename], if not null use it; else
B) load the image, make the thumbnail and store it in myDictionary[filename], then use it.

5.
stacks are useless in this.

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


modified on Sunday, June 12, 2011 9:04 AM

GeneralRe: Loading images into Image list - Problem Pin
S K Y2-Mar-09 16:00
S K Y2-Mar-09 16:00 
AnswerRe: Loading images into Image list - Problem Pin
Luc Pattyn2-Mar-09 16:15
sitebuilderLuc Pattyn2-Mar-09 16:15 
GeneralRe: Loading images into Image list - Problem Pin
S K Y2-Mar-09 16:59
S K Y2-Mar-09 16:59 
QuestionLittle problem. When I get data from excel file Pin
sizers2-Mar-09 12:49
sizers2-Mar-09 12:49 
QuestionHow to get default/perferred Network Connection Pin
TheFM2342-Mar-09 11:24
TheFM2342-Mar-09 11:24 
AnswerRe: How to get default/perferred Network Connection Pin
harold aptroot2-Mar-09 13:00
harold aptroot2-Mar-09 13:00 
QuestionHas anybody ever seen this IO exception before? Pin
snorkie2-Mar-09 11:20
professionalsnorkie2-Mar-09 11:20 
AnswerRe: Has anybody ever seen this IO exception before? Pin
harold aptroot2-Mar-09 11:27
harold aptroot2-Mar-09 11:27 
AnswerRe: Has anybody ever seen this IO exception before? Pin
led mike2-Mar-09 11:30
led mike2-Mar-09 11:30 
GeneralRe: Has anybody ever seen this IO exception before? Pin
snorkie2-Mar-09 11:42
professionalsnorkie2-Mar-09 11:42 
GeneralRe: Has anybody ever seen this IO exception before? Pin
led mike2-Mar-09 11:56
led mike2-Mar-09 11:56 
GeneralRe: Has anybody ever seen this IO exception before? Pin
snorkie2-Mar-09 12:03
professionalsnorkie2-Mar-09 12:03 
AnswerRe: Has anybody ever seen this IO exception before? Pin
Yusuf2-Mar-09 12:15
Yusuf2-Mar-09 12:15 
AnswerRe: Has anybody ever seen this IO exception before? Pin
pbarrette3-Mar-09 15:30
pbarrette3-Mar-09 15:30 
QuestionHow to create an instance of a c++ class inside a dll in a c# project Pin
EcK3kO2-Mar-09 11:16
EcK3kO2-Mar-09 11:16 
AnswerRe: How to create an instance of a c++ class inside a dll in a c# project Pin
led mike2-Mar-09 11:32
led mike2-Mar-09 11:32 
QuestionEasy memory optimizations? Pin
bbranded2-Mar-09 10:54
bbranded2-Mar-09 10:54 

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.