BADLY NEED HELP PLS... g.CopyFromScreen command not working after uploading...

Discussion in 'ASP.NET 2.0' started by maryann, Jun 19, 2007.

  1. Hi,

    Please I badly need your help. After uploading the files to DISCOUNTASP.Net the error message below occurs. The program is running perfectly in my computer with localhost. I don't know why I got error on the command below marked with color red. The user's testing is on Friday this week and I badly need to recover it asap.
    Thanks in advance.



    Server Error in '/' Application.


    The handle is invalid
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ComponentModel.Win32Exception: The handle is invalid

    Source Error:






    Code:
    Line 31:         g = Graphics.FromImage(b)
    Line 32: 
    Line 33:         g.CopyFromScreen(363, 130, 0, 0, s) 'left,top
    Line 34: 
    Line 35:         b.Save(Server.MapPath("paint.png"), ImageFormat.Png)
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    mary ann,

    what are you trying to do w/your application? As far as i know, this method capture the screen of the computer and save it as bit map and it most likely used in desktop application.

    Afterall, why do you want to capture the screen of the server?

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page