Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am able to save images on my local system in a folder.
But when i attend to save in another system(server) i am getting error
as format not supported.pls help
i have given ip address and drive name and folder name bu its showing error

C#
private void timer1_Tick(object sender, EventArgs e)
        {
            this.Hide();
            System.Drawing.Bitmap Bitmap;
            Graphics Graps;
            Bitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
            Graps = Graphics.FromImage(Bitmap);
            string s = comboBox1.SelectedItem.ToString()+" "+ DateTime.Now.ToString();
            s = s.Replace(':', '.');
            Graps.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);


           Bitmap.Save(@"\\192.168.1.10\E:\Screenshotseg\" + s + ".Jpeg", ImageFormat.Jpeg);

          
            this.Show();
        }
Posted
Updated 16-Jan-12 20:59pm
v3
Comments
Anuja Pawar Indore 17-Jan-12 2:59am    
Added pre tag

You cannot store at \\192.168.1.10\E:\Screenshotseg\
It should be \\192.168.1.10\E$\Screenshotseg\
 
Share this answer
 
Comments
jasen.selvaraj 17-Jan-12 3:33am    
A generic error occurred in GDI+.


this is the error i am getting after trying the above solution
Prerak Patel 17-Jan-12 4:29am    
int screenWidth = Screen.GetBounds(new Point(0, 0)).Width;
int screenHeight = Screen.GetBounds(new Point(0, 0)).Height;
Bitmap bmpScreenShot = new Bitmap(screenWidth, screenHeight);
Graphics gfx = Graphics.FromImage((Image)bmpScreenShot);
gfx.CopyFromScreen(0, 0, 0, 0, new Size(screenWidth, screenHeight));
bmpScreenShot.Save(@"\\192.168.1.10\Temparea\Screenshotseg\" + s + ".Jpeg", ImageFormat.Jpeg);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900