CaptureScreenToFile - Error


Author
Message
Rogerio Mauri
Rogerio Mauri
StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)
Group: StrataFrame Users
Posts: 205, Visits: 629
Method returns GDI error.

  - Windows Vista
  - VS2005
  - fileName = "C:\\Temp\\Tela.jgp"



// Método para salvar screen em arquivo
private void CapturaScreen(string fileName)
{
     MicroFour.StrataFrame.Tools.
ScreenCapture.CaptureScreenToFile(fileName, System.Drawing.Imaging.ImageFormat.Jpeg);
}

System.Runtime.InteropServices.ExternalException was unhandled by user code
  Message="Erro genérico de GDI+."
  Source="System.Drawing"
  ErrorCode=-2147467259
  StackTrace:
       em System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
       em System.Drawing.Image.Save(String filename, ImageFormat format)
       em MicroFour.StrataFrame.Tools.ScreenCapture.CaptureScreenToFile(String FileName, ImageFormat Format)
       em NCClube.Forms.FormCracha.cmdFoto_Click(Object sender, EventArgs e) na C:\Users\Rogerio\Documents\Visual Studio 2005\Projects\StrataFrameProjects\NCClube\NCClube\Forms\FormCracha.cs:linha 111
       em System.Windows.Forms.Control.OnClick(EventArgs e)
       em System.Windows.Forms.Button.OnClick(EventArgs e)
       em System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       em System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       em System.Windows.Forms.Control.WndProc(Message& m)
       em System.Windows.Forms.ButtonBase.WndProc(Message& m)
       em System.Windows.Forms.Button.WndProc(Message& m)
       em System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
       em System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
       em System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Rogério Mauri Smile



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Rogerio Mauri - 16 Years Ago
Rogerio Mauri - 16 Years Ago
Ivan George Borges - 16 Years Ago
Rogerio Mauri - 16 Years Ago
                 ??? :crying:
Rogerio Mauri - 16 Years Ago
                     ???
Rogerio Mauri - 16 Years Ago
                         I know that you want an answer here, but this is an issue with your...
Trent L. Taylor - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search