Click here to Skip to main content
15,892,809 members
Home / Discussions / C#
   

C#

 
GeneralRe: Escape characters in text box Pin
partyganger17-Aug-04 12:11
partyganger17-Aug-04 12:11 
QuestionBitmap creation in memory?? Pin
elf2317-Aug-04 11:05
elf2317-Aug-04 11:05 
AnswerRe: Bitmap creation in memory?? Pin
Stanciu Vlad18-Aug-04 1:11
Stanciu Vlad18-Aug-04 1:11 
GeneralRe: Bitmap creation in memory?? Pin
elf2318-Aug-04 3:13
elf2318-Aug-04 3:13 
AnswerRe: Bitmap creation in memory?? Pin
Corinna John18-Aug-04 3:13
Corinna John18-Aug-04 3:13 
GeneralPainting one control's graphics onto another ctrl Pin
sortamusic17-Aug-04 10:37
sortamusic17-Aug-04 10:37 
GeneralRe: Painting one control's graphics onto another ctrl Pin
Stanciu Vlad18-Aug-04 1:05
Stanciu Vlad18-Aug-04 1:05 
GeneralRe: Painting one control's graphics onto another ctrl Pin
sortamusic18-Aug-04 7:38
sortamusic18-Aug-04 7:38 
Thank you for your help! It has certainly put me in the right direction. I am still having a problem with it though. Instead of drawing the graphics of my underlying control, the graphics being painted are from a screen shot. Here is the code I am using:

protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;

if (control != null)
{
Debug.WriteLine( "Drawing graphics of control: " + control.GetType().FullName );

//Get the source and destination hDC from the graphics with
//(Graphics)g.GetHdc();, call BitBlt and release the hDCs (Graphics)g.ReleaseHdc(hDC);
Graphics cg = control.CreateGraphics();

IntPtr hdcSrc = cg.GetHdc();
IntPtr hdcDest = g.GetHdc();

BitBlt(hdcDest, 0, 0, this.Width, this.Height, hdcSrc, 0, 0,
(int)BitBltConstants.SRCCOPY);

g.ReleaseHdc(hdcDest);
cg.ReleaseHdc(hdcSrc);
return;
}
}

The variable 'control' is the control that I want to grab the graphics from and paint onto the control using this paint method. One problem might be that the 'control' control is never visible to the user. The SRCCOPY constant has a value of 0x00CC0020. Any suggestions?
GeneralRe: Painting one control's graphics onto another ctrl Pin
Stanciu Vlad27-Aug-04 3:21
Stanciu Vlad27-Aug-04 3:21 
GeneralTransparencyKey not working correctly Pin
3Dizard17-Aug-04 9:04
3Dizard17-Aug-04 9:04 
GeneralRe: TransparencyKey not working correctly Pin
Stanciu Vlad18-Aug-04 0:47
Stanciu Vlad18-Aug-04 0:47 
GeneralRe: TransparencyKey not working correctly Pin
leppie18-Aug-04 4:00
leppie18-Aug-04 4:00 
GeneralError while deploying with the emulator Pin
mathon17-Aug-04 7:50
mathon17-Aug-04 7:50 
Questionz-order equivalent for windows? Pin
ddelapasse17-Aug-04 7:34
ddelapasse17-Aug-04 7:34 
AnswerRe: z-order equivalent for windows? Pin
Stefan Troschuetz18-Aug-04 0:18
Stefan Troschuetz18-Aug-04 0:18 
GeneralExcel CSV Problems Pin
Member 120485117-Aug-04 7:12
Member 120485117-Aug-04 7:12 
Generalcommand line compiling Pin
Martin Marvinski17-Aug-04 7:06
Martin Marvinski17-Aug-04 7:06 
GeneralRe: command line compiling Pin
Nick Parker17-Aug-04 7:25
protectorNick Parker17-Aug-04 7:25 
GeneralCurious focus problem. Pin
MrEyes17-Aug-04 6:48
MrEyes17-Aug-04 6:48 
GeneralDropDown Button Pin
Anonymous17-Aug-04 6:10
Anonymous17-Aug-04 6:10 
GeneralRe: DropDown Button Pin
Syed Abdul Khader17-Aug-04 6:33
Syed Abdul Khader17-Aug-04 6:33 
GeneralRe: DropDown Button Pin
cjengler18-Aug-04 1:24
cjengler18-Aug-04 1:24 
GeneralSending XML file as a parameter Pin
sacoskun17-Aug-04 5:52
sacoskun17-Aug-04 5:52 
GeneralRe: Sending XML file as a parameter Pin
Stanciu Vlad17-Aug-04 6:52
Stanciu Vlad17-Aug-04 6:52 
GeneralRe: Sending XML file as a parameter Pin
leppie17-Aug-04 8:19
leppie17-Aug-04 8:19 

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.