StrataFrame Forum

CAPTURESCREENTOFILE

http://forum.strataframe.net/Topic31149.aspx

By Eric Leissler - 4/17/2012

Hi

Here is the problem of the dayI use the following commands in my programDim Ecran As String = "c:\aumeric\temp\saisine.png"

Dim CeForm As String = "c:\aumeric\temp\saisine.png"

CaptureScreenToFile(Ecran, System.Drawing.Imaging.ImageFormat.Png)

CaptureWindowToFile(
Me.Handle, CeForm, System.Drawing.Imaging.ImageFormat.Png)

On my computer it works very well, but in my client, I Nee a gdi error.ExternalException
  Une erreur générique s'est produite dans GDI+.

Source     : System.Drawing

Stack Trace:
   à System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
   à System.Drawing.Image.Save(String filename, ImageFormat format)
   à MicroFour.StrataFrame.Tools.ScreenCapture.CaptureScreenToFile(String FileName, ImageFormat Format)
   à mycenes.Form_saisine.El_bouton1_Click_2(Object sender, EventArgs e) dans C:\developpement_dotnet\2010\projet_mycenes\mycenes\mycenes\process_location\Form_saisine.vb:ligne 304
   à System.Windows.Forms.Control.OnClick(EventArgs e)
   à System.Windows.Forms.Button.OnClick(EventArgs e)
   à System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   à System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   à System.Windows.Forms.Control.WndProc(Message& m)
   à System.Windows.Forms.ButtonBase.WndProc(Message& m)
   à System.Windows.Forms.Button.WndProc(Message& m)
   à System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
   à System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
   à System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

is it  something  more to install, when using this command capturescreentofile  ?  Thanks Best regardEric LEISSLER 
By Ivan George Borges - 4/17/2012

Hi Eric.

Does the user at the client side have permissions to the folder "c:\aumeric\temp\"?
By Eric Leissler - 4/18/2012

HI IVAN

yes , users have permission on c:\aumeric\temp

i mad an update of the windows in this computer and now it's running verry well.

very thanks

Best regard

Eric LEISSLER
By Ivan George Borges - 4/18/2012

Glad you got it working, Eric. Wink