Click here to Skip to main content
15,912,507 members
Home / Discussions / Graphics
   

Graphics

 
GeneralRe: AVI Duration Pin
Mark Salsbery30-Sep-08 16:12
Mark Salsbery30-Sep-08 16:12 
GeneralRe: AVI Duration Pin
dwg19861-Oct-08 7:42
dwg19861-Oct-08 7:42 
GeneralRe: AVI Duration Pin
Mark Salsbery1-Oct-08 8:13
Mark Salsbery1-Oct-08 8:13 
QuestionGDI+ how can I add transparent to image that doesn''t had one? [modified] Pin
xanagan66626-Sep-08 1:07
xanagan66626-Sep-08 1:07 
AnswerRe: GDI+ how can I add transparent to image that doesn''t had one? Pin
Mark Salsbery27-Sep-08 9:28
Mark Salsbery27-Sep-08 9:28 
GeneralRe: GDI+ how can I add transparent to image that doesn''t had one? Pin
xanagan66628-Sep-08 15:03
xanagan66628-Sep-08 15:03 
QuestionThe same in VB? Pin
Sonhospa29-Sep-08 6:12
Sonhospa29-Sep-08 6:12 
Questionscreencapture partly black Pin
jVersteegen25-Sep-08 1:50
jVersteegen25-Sep-08 1:50 
hello
tried to make a screencapture of a panel with controls on it and "connections" at the background (created using paint() procedure). DrawToBitmap does only the visible part of the panel, so i came up with the following code after a while. problem is that the invisible part of the panel turns up black in the resulting jpeg picture. Does anyone have any suggestions for me?

public static void CreateScreenCaptureFile(Control ctrl, string path)
{
// get dimensions (part may be invisible)
int w = 0,h = 0;
foreach(Control c in ctrl.Controls )
{
if(c.Left + c.Width > w) w = c.Left + c.Width + 100;
if(c.Top + c.Height > h) h = c.Top + c.Height + 100;
}
if(w == 0) w = ctrl.DisplayRectangle.Width;
if(h == 0) h = ctrl.DisplayRectangle.Height;

// create bitmap
IntPtr hwnd = ctrl.Handle;
Bitmap b = new Bitmap (w, h);
Graphics bg = Graphics.FromImage (b);
IntPtr bgdc = bg.GetHdc ();

SendMessage(hwnd , WM_PAINT, (int)bgdc, 0);
SendMessage(hwnd, WM_PRINT, (int)bgdc, (int)(
DrawingOptions.PRF_OWNED |
DrawingOptions.PRF_CHILDREN |
DrawingOptions.PRF_CLIENT)
);

bg.ReleaseHdc();
bg.Dispose ();

// save the result jpeg file
b.Save(path, ImageFormat.Jpeg);
b.Dispose ();

}
AnswerRe: screencapture partly black Pin
Mark Salsbery27-Sep-08 9:35
Mark Salsbery27-Sep-08 9:35 
GeneralRe: screencapture partly black Pin
joost.versteegen2-Oct-08 20:49
joost.versteegen2-Oct-08 20:49 
GeneralRe: screencapture partly black Pin
Mark Salsbery3-Oct-08 4:43
Mark Salsbery3-Oct-08 4:43 
GeneralRe: screencapture partly black Pin
joost.versteegen3-Oct-08 4:49
joost.versteegen3-Oct-08 4:49 
GeneralRe: screencapture partly black Pin
Mark Salsbery3-Oct-08 4:51
Mark Salsbery3-Oct-08 4:51 
QuestionRotation and zoom in/out of Cube Pin
aurosikhadas24-Sep-08 22:07
aurosikhadas24-Sep-08 22:07 
QuestionRotate problem in directx [modified] Pin
sepel23-Sep-08 21:10
sepel23-Sep-08 21:10 
Questiongdi+ render viewport/camera perspective only Pin
Leblanc Meneses22-Sep-08 21:12
Leblanc Meneses22-Sep-08 21:12 
Question3D Model for game Pin
AmitDey22-Sep-08 21:04
AmitDey22-Sep-08 21:04 
AnswerRe: 3D Model for game Pin
AmitDey22-Sep-08 21:07
AmitDey22-Sep-08 21:07 
GeneralRe: 3D Model for game Pin
Tim Craig23-Sep-08 19:00
Tim Craig23-Sep-08 19:00 
GeneralRe: 3D Model for game Pin
AmitDey23-Sep-08 22:17
AmitDey23-Sep-08 22:17 
Questioncan someone help me in designing my MDi or my mainform.. Pin
cutedrew20-Sep-08 22:52
cutedrew20-Sep-08 22:52 
AnswerRe: can someone help me in designing my MDi or my mainform.. Pin
Smithers-Jones24-Sep-08 0:32
Smithers-Jones24-Sep-08 0:32 
QuestionParticle Deposition Pin
Neil Ramirez17-Sep-08 16:39
Neil Ramirez17-Sep-08 16:39 
Questionbrush problem in c#... Pin
Sajjad Izadi17-Sep-08 8:13
Sajjad Izadi17-Sep-08 8:13 
AnswerRe: brush problem in c#... Pin
oobimoo17-Sep-08 8:32
oobimoo17-Sep-08 8:32 

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.