Click here to Skip to main content
15,901,426 members
Home / Discussions / C#
   

C#

 
GeneralRe: How do I pass and reference a Panel? Pin
Luc Pattyn1-Mar-07 12:32
sitebuilderLuc Pattyn1-Mar-07 12:32 
GeneralRe: How do I pass and reference a Panel? Pin
Christian Graus1-Mar-07 12:36
protectorChristian Graus1-Mar-07 12:36 
AnswerRe: How do I pass and reference a Panel? Pin
Christian Graus1-Mar-07 12:38
protectorChristian Graus1-Mar-07 12:38 
QuestionSaving data in access database Pin
conemajstor1-Mar-07 11:22
conemajstor1-Mar-07 11:22 
QuestionImage Formats Pin
Dobromir Dimitrov1-Mar-07 11:16
Dobromir Dimitrov1-Mar-07 11:16 
AnswerRe: Image Formats Pin
Christian Graus1-Mar-07 12:35
protectorChristian Graus1-Mar-07 12:35 
AnswerRe: Image Formats Pin
Luc Pattyn1-Mar-07 12:37
sitebuilderLuc Pattyn1-Mar-07 12:37 
AnswerRe: Image Formats Pin
Hayder Marzouk1-Mar-07 22:19
Hayder Marzouk1-Mar-07 22:19 
Hi,
To reduce the memory consumption :
1- Use the jpeg format
2- Specify the compression level
3- Always dispose graphics objects, pens, images,.. and set them to null

Here some code to specify the compression level :
private static ImageCodecInfo GetEncoderInfo(String mimeType)
{
int j;
ImageCodecInfo[] encoders;
encoders = ImageCodecInfo.GetImageEncoders();
for(j = 0; j < encoders.Length; ++j)
{
if(encoders[j].MimeType == mimeType)
return encoders[j];
}
return null;
}
private void SaveJPGWithCompressionSetting( Image image, string szFileName, long lCompression )
{
EncoderParameters eps = new EncoderParameters(1);
eps.Param[0] = new EncoderParameter( Encoder.Quality, lCompression );
ImageCodecInfo ici = GetEncoderInfo("image/jpeg");
image.Save( szFileName, ici, eps );
}
QuestionBuild Problem1 Pin
greekius1-Mar-07 10:22
greekius1-Mar-07 10:22 
AnswerRe: Build Problem1 Pin
Luc Pattyn1-Mar-07 10:59
sitebuilderLuc Pattyn1-Mar-07 10:59 
GeneralRe: Build Problem1 Pin
greekius1-Mar-07 21:21
greekius1-Mar-07 21:21 
GeneralRe: Build Problem1 Pin
Luc Pattyn1-Mar-07 23:11
sitebuilderLuc Pattyn1-Mar-07 23:11 
QuestionInvoke method on a datagridview control ! Pin
Hussam Fattahi1-Mar-07 9:54
Hussam Fattahi1-Mar-07 9:54 
AnswerRe: Invoke method on a datagridview control ! Pin
Luc Pattyn1-Mar-07 10:18
sitebuilderLuc Pattyn1-Mar-07 10:18 
GeneralRe: Invoke method on a datagridview control ! Pin
Hussam Fattahi1-Mar-07 10:49
Hussam Fattahi1-Mar-07 10:49 
QuestionThe requested URI is invalid for this FTP command Pin
bemahesh1-Mar-07 9:06
bemahesh1-Mar-07 9:06 
QuestionShutdown Pin
hadad1-Mar-07 8:24
hadad1-Mar-07 8:24 
AnswerRe: Shutdown [modified] Pin
Dawid Mazuruk1-Mar-07 10:38
Dawid Mazuruk1-Mar-07 10:38 
AnswerRe: Shutdown Pin
Luc Pattyn1-Mar-07 11:03
sitebuilderLuc Pattyn1-Mar-07 11:03 
AnswerRe: Shutdown Pin
Hamid_RT2-Mar-07 0:01
Hamid_RT2-Mar-07 0:01 
QuestionSimple string Function Pin
Imran Adam1-Mar-07 7:28
Imran Adam1-Mar-07 7:28 
AnswerRe: Simple string Function Pin
Stefan Troschuetz1-Mar-07 7:32
Stefan Troschuetz1-Mar-07 7:32 
GeneralRe: Simple string Function Pin
Luc Pattyn1-Mar-07 7:57
sitebuilderLuc Pattyn1-Mar-07 7:57 
GeneralRe: Simple string Function Pin
Colin Angus Mackay1-Mar-07 8:01
Colin Angus Mackay1-Mar-07 8:01 
GeneralRe: Simple string Function Pin
Imran Adam1-Mar-07 9:00
Imran Adam1-Mar-07 9:00 

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.