Click here to Skip to main content
15,891,473 members
Home / Discussions / C#
   

C#

 
GeneralRe: Thread doesn't start with VS .NET 2003 Pin
Rein Hillmann8-Aug-03 5:38
Rein Hillmann8-Aug-03 5:38 
GeneralMulti-Threaded Programming Pin
monrobot137-Aug-03 17:12
monrobot137-Aug-03 17:12 
GeneralRe: Multi-Threaded Programming Pin
J. Dunlap7-Aug-03 17:35
J. Dunlap7-Aug-03 17:35 
GeneralRe: Multi-Threaded Programming Pin
monrobot138-Aug-03 3:15
monrobot138-Aug-03 3:15 
GeneralRe: Multi-Threaded Programming Pin
J. Dunlap8-Aug-03 9:49
J. Dunlap8-Aug-03 9:49 
GeneralBitBlt performance in C# Pin
CyberKewl7-Aug-03 16:52
CyberKewl7-Aug-03 16:52 
GeneralRe: BitBlt performance in C# Pin
J. Dunlap7-Aug-03 17:45
J. Dunlap7-Aug-03 17:45 
GeneralRe: BitBlt performance in C# Pin
CyberKewl7-Aug-03 21:21
CyberKewl7-Aug-03 21:21 
No, that doesn't make much difference. The code is now :

Image myImage = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);

Graphics gr1 = Graphics.FromImage(myImage);

IntPtr dc1 = gr1.GetHdc();

IntPtr dc2 = GetDC(GetDesktopWindow());

BitBlt(dc1, 0, 0, Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, dc2, 0, 0, 13369376);

gr1.ReleaseHdc(dc1);
ReleaseDC(GetDesktopWindow(), dc2);
GC.Collect();
return myImage;

I fail to mention earlier that i am utilising a savejpgwithcompression function and after some checking, it appears that it is the cause of the problem. It could be the compression part, but it is essential to make the file size smaller. Here's the code :

private void SaveJPGWithCompressionSetting( Image image, string szFileName, long lCompression )
{
EncoderParameters eps = new EncoderParameters(1);
eps.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, lCompression );
ImageCodecInfo ici = GetEncoderInfo("image/jpeg");
image.Save( szFileName, ici, eps );
}

private ImageCodecInfo GetEncoderInfo(string mimeType)
{
ImageCodecInfo[] codecs = ImageCodecInfo.GetImageEncoders();
foreach (ImageCodecInfo codec in codecs)
{
if (codec.MimeType == mimeType){return codec;}
}
return null;
}

GeneralRe: BitBlt performance in C# Pin
Ista8-Aug-03 6:26
Ista8-Aug-03 6:26 
GeneralChanging a form's title Pin
eggie57-Aug-03 15:17
eggie57-Aug-03 15:17 
GeneralRe: Changing a form's title Pin
J. Dunlap7-Aug-03 15:20
J. Dunlap7-Aug-03 15:20 
GeneralRe: Changing a form's title Pin
eggie57-Aug-03 15:30
eggie57-Aug-03 15:30 
GeneralRe: Changing a form's title Pin
Rein Hillmann7-Aug-03 21:11
Rein Hillmann7-Aug-03 21:11 
GeneralRe: Changing a form's title Pin
freshthinking8-Aug-03 0:07
freshthinking8-Aug-03 0:07 
GeneralColor or Colour Pin
totig7-Aug-03 12:23
totig7-Aug-03 12:23 
GeneralRe: Color or Colour Pin
J. Dunlap7-Aug-03 12:51
J. Dunlap7-Aug-03 12:51 
GeneralHandle mouse move events in C# Pin
sumeat7-Aug-03 9:20
sumeat7-Aug-03 9:20 
GeneralRe: Handle mouse move events in C# Pin
Nnamdi Onyeyiri7-Aug-03 11:10
Nnamdi Onyeyiri7-Aug-03 11:10 
GeneralRe: Handle mouse move events in C# Pin
sumeat7-Aug-03 11:42
sumeat7-Aug-03 11:42 
GeneralRe: Handle mouse move events in C# Pin
Ista7-Aug-03 16:08
Ista7-Aug-03 16:08 
Generalmore datagrid q's: select row & tab down Pin
mikemilano7-Aug-03 9:09
mikemilano7-Aug-03 9:09 
GeneralRe: more datagrid q's: select row & tab down Pin
mikemilano7-Aug-03 9:20
mikemilano7-Aug-03 9:20 
GeneralRe: more datagrid q's: select row & tab down Pin
Ista7-Aug-03 17:34
Ista7-Aug-03 17:34 
GeneralRe: more datagrid q's: select row & tab down Pin
Ista7-Aug-03 17:38
Ista7-Aug-03 17:38 
GeneralRetreiving class from XML WebService Pin
Mazdak7-Aug-03 8:43
Mazdak7-Aug-03 8:43 

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.