Click here to Skip to main content
15,894,630 members
Home / Discussions / C#
   

C#

 
QuestionWhat is the difference - Convert.Int32() --- Int32.Parse() --- (int) Pin
dataminers4-Sep-08 3:53
dataminers4-Sep-08 3:53 
AnswerRe: What is the difference - Convert.Int32() --- Int32.Parse() --- (int) Pin
Ravi Bhavnani4-Sep-08 3:56
professionalRavi Bhavnani4-Sep-08 3:56 
AnswerRe: What is the difference - Convert.Int32() --- Int32.Parse() --- (int) Pin
DaveyM694-Sep-08 4:09
professionalDaveyM694-Sep-08 4:09 
AnswerRe: What is the difference - Convert.Int32() --- Int32.Parse() --- (int) Pin
Guffa4-Sep-08 6:53
Guffa4-Sep-08 6:53 
QuestionPause and Resume facility in a downloader application using C# Pin
Student Developer4-Sep-08 3:32
Student Developer4-Sep-08 3:32 
AnswerRe: Pause and Resume facility in a downloader application using C# Pin
Ravi Bhavnani4-Sep-08 3:54
professionalRavi Bhavnani4-Sep-08 3:54 
QuestionSecure Data Exchange Between WinfForm app and Web Service Pin
#realJSOP4-Sep-08 3:22
mve#realJSOP4-Sep-08 3:22 
AnswerRe: Secure Data Exchange Between WinfForm app and Web Service Pin
Manas Bhardwaj4-Sep-08 3:27
professionalManas Bhardwaj4-Sep-08 3:27 
AnswerRe: Secure Data Exchange Between WinfForm app and Web Service Pin
Ravi Bhavnani4-Sep-08 4:02
professionalRavi Bhavnani4-Sep-08 4:02 
GeneralRe: Secure Data Exchange Between WinfForm app and Web Service Pin
#realJSOP4-Sep-08 4:11
mve#realJSOP4-Sep-08 4:11 
AnswerRe: Secure Data Exchange Between WinfForm app and Web Service Pin
led mike4-Sep-08 5:29
led mike4-Sep-08 5:29 
AnswerRe: Secure Data Exchange Between WinfForm app and Web Service Pin
leppie4-Sep-08 9:05
leppie4-Sep-08 9:05 
GeneralRe: Secure Data Exchange Between WinfForm app and Web Service Pin
#realJSOP5-Sep-08 0:20
mve#realJSOP5-Sep-08 0:20 
GeneralRe: Secure Data Exchange Between WinfForm app and Web Service Pin
leppie5-Sep-08 3:50
leppie5-Sep-08 3:50 
Questiondouble Pin
RugbyLeague4-Sep-08 2:20
RugbyLeague4-Sep-08 2:20 
AnswerRe: double [modified] Pin
c24234-Sep-08 2:51
c24234-Sep-08 2:51 
AnswerRe: double Pin
RugbyLeague4-Sep-08 2:52
RugbyLeague4-Sep-08 2:52 
AnswerRe: double Pin
Mbah Dhaim4-Sep-08 2:53
Mbah Dhaim4-Sep-08 2:53 
AnswerRe: double Pin
DaveyM694-Sep-08 3:11
professionalDaveyM694-Sep-08 3:11 
GeneralRe: double [modified] Pin
#realJSOP4-Sep-08 3:27
mve#realJSOP4-Sep-08 3:27 
GeneralRe: double Pin
Dan Neely4-Sep-08 4:32
Dan Neely4-Sep-08 4:32 
QuestionPanel screencapture is black in invisible part of panel Pin
joost.versteegen4-Sep-08 2:05
joost.versteegen4-Sep-08 2:05 
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?
protected virtual void mnuRptClicked(object sender, EventArgs e)
{
    this.AutoScrollPosition = new Point(0, 0);
    // get dimensions
    int w = 0,h = 0;
    foreach(Control c in this.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 = this.DisplayRectangle.Width;
    if(h == 0) h = this.DisplayRectangle.Height;
    // create bitmap
    Bitmap b = new Bitmap(w,h);
    Graphics bg = Graphics.FromImage(b);
    // copy screen to bitmap
    // TODO: invisible part of screen turns out black
    int bgHdc = (int)bg.GetHdc();
    SendMessage(this.Handle , WM_PAINT, bgHdc, 0);
    SendMessage(this.Handle, WM_PRINT, bgHdc, (int)(
                DrawingOptions.PRF_OWNED |
                DrawingOptions.PRF_CHILDREN |
                DrawingOptions.PRF_CLIENT)
                );
    bg.ReleaseHdc();
    bg.Dispose ();
    // save the result as captured.jpeg
    b.Save(Application.StartupPath + @"\captured.jpg", ImageFormat.Jpeg);
    b.Dispose ();
}

AnswerRe: Panel screencapture is black in invisible part of panel Pin
leppie4-Sep-08 9:02
leppie4-Sep-08 9:02 
GeneralRe: Panel screencapture is black in invisible part of panel Pin
joost.versteegen4-Sep-08 23:11
joost.versteegen4-Sep-08 23:11 
GeneralRe: Panel screencapture is black in invisible part of panel Pin
leppie4-Sep-08 23:47
leppie4-Sep-08 23:47 

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.