Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
GeneralRe: Slow binary reader Pin
Guffa16-Sep-07 6:04
Guffa16-Sep-07 6:04 
GeneralRe: Slow binary reader Pin
Xmen Real 16-Sep-07 7:24
professional Xmen Real 16-Sep-07 7:24 
GeneralRe: Slow binary reader Pin
Insincere Dave16-Sep-07 8:11
Insincere Dave16-Sep-07 8:11 
GeneralRe: Slow binary reader Pin
Xmen Real 16-Sep-07 18:08
professional Xmen Real 16-Sep-07 18:08 
QuestionNetwork programing Pin
ali_reza_zareian15-Sep-07 22:54
ali_reza_zareian15-Sep-07 22:54 
AnswerRe: Network programing Pin
Muammar©16-Sep-07 0:48
Muammar©16-Sep-07 0:48 
AnswerRe: Network programing Pin
Dave Kreskowiak16-Sep-07 2:10
mveDave Kreskowiak16-Sep-07 2:10 
Questioncontrol graphics capture Pin
quaso115-Sep-07 22:50
quaso115-Sep-07 22:50 
Hi.
I have this problem.
In my project I have a control which does not fit into the screen. So there are scrollbars that user can use. My application also paints something direct on the control. And now I want to save the control's surface to the image file. I google this code:
[DllImport("gdi32.dll")]<br />
		private static extern bool BitBlt(IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, System.Int32 dwRop);<br />
		[DllImport("User32.dll")]<br />
		public extern static System.IntPtr GetDC(System.IntPtr hWnd);<br />
		[DllImport("User32.dll")]<br />
		public extern static int ReleaseDC(System.IntPtr hWnd, System.IntPtr hDC);<br />
<br />
		private void foo() {<br />
			System.IntPtr srcDC = GetDC(this.ctrl.Handle);<br />
			Bitmap bm = new Bitmap(this.ctrl.Width, this.ctrl.Height);<br />
			Graphics g = Graphics.FromImage(bm);<br />
			System.IntPtr bmDC = g.GetHdc();<br />
			BitBlt(bmDC, 0, 0, bm.Width, bm.Height, srcDC, 0, 0, 0x00CC0020 /*SRCCOPY*/);<br />
			ReleaseDC(this.ctrl.Handle, srcDC);<br />
			g.ReleaseHdc(bmDC);<br />
			g.Dispose();<br />
			bm.Save("a.bmp");<br />
		}


But there is a problem because it capture only the visible part of the control. And I want to capture it all (also the part that is not visible due to actual scroll position).

Could you please help me what I can do?

0101000101110101
0110000101110011
01101111

AnswerRe: control graphics capture Pin
Dave Kreskowiak16-Sep-07 7:05
mveDave Kreskowiak16-Sep-07 7:05 
GeneralRe: control graphics capture Pin
quaso116-Sep-07 7:08
quaso116-Sep-07 7:08 
GeneralRe: control graphics capture Pin
Dave Kreskowiak16-Sep-07 8:59
mveDave Kreskowiak16-Sep-07 8:59 
QuestionGet CPU Temperature Pin
Johan Martensson15-Sep-07 22:10
Johan Martensson15-Sep-07 22:10 
AnswerRe: Get CPU Temperature Pin
Giorgi Dalakishvili15-Sep-07 23:04
mentorGiorgi Dalakishvili15-Sep-07 23:04 
AnswerRe: Get CPU Temperature Pin
Dave Kreskowiak16-Sep-07 7:02
mveDave Kreskowiak16-Sep-07 7:02 
AnswerRe: Get CPU Temperature Pin
Urs Enzler16-Sep-07 20:56
Urs Enzler16-Sep-07 20:56 
GeneralRe: Get CPU Temperature Pin
Johan Martensson16-Sep-07 21:29
Johan Martensson16-Sep-07 21:29 
Questionhow to use NGen to create Native Image ? Pin
hdv21215-Sep-07 12:59
hdv21215-Sep-07 12:59 
AnswerRe: how to use NGen to create Native Image ? Pin
Judah Gabriel Himango15-Sep-07 13:04
sponsorJudah Gabriel Himango15-Sep-07 13:04 
AnswerRe: how to use NGen to create Native Image ? Pin
Dave Kreskowiak15-Sep-07 15:00
mveDave Kreskowiak15-Sep-07 15:00 
Questionhow can made login user form application in c#.net? Pin
mohammedali200615-Sep-07 5:47
mohammedali200615-Sep-07 5:47 
AnswerRe: how can made login user form application in c#.net? Pin
Ed.Poore15-Sep-07 7:02
Ed.Poore15-Sep-07 7:02 
AnswerRe: how can made login user form application in c#.net? Pin
Kristian Sixhøj15-Sep-07 8:31
Kristian Sixhøj15-Sep-07 8:31 
GeneralRe: how can made login user form application in c#.net? Pin
Dave Kreskowiak15-Sep-07 11:30
mveDave Kreskowiak15-Sep-07 11:30 
GeneralRe: how can made login user form application in c#.net? Pin
Kristian Sixhøj15-Sep-07 11:46
Kristian Sixhøj15-Sep-07 11:46 
GeneralRe: how can made login user form application in c#.net? Pin
Dave Kreskowiak15-Sep-07 15:00
mveDave Kreskowiak15-Sep-07 15: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.