qesutions: moving an img , saveing a screen shoot  
Author Message
folen





PostPosted: .NET Base Class Library, qesutions: moving an img , saveing a screen shoot Top

am making a proj in asp.net/c#
it includes moving an img dynamcly , but the img control dosn't have position propretes(neither left and top ones).
anybody know how can i do it or can refer me to somewhere that teaches me what i need to know

and i need to save the new img (img over img) to a file
anybody know how or a place i can learn how to take a screenshoot of a spacific place in the UI (a sqaure in the UI that i can save to an img file)

thanks




.NET Development22  
 
 
ahmedilyas





PostPosted: .NET Base Class Library, qesutions: moving an img , saveing a screen shoot Top

the best place to ask ASP.NET related questions would be over at the ASP.NET forums:

http://forums.asp.net

in terms of making a screenshot, here is an example where it will take the entire screenshot, you can modify the code to only take a specific part of the screen:

Bitmap theScreenShotBitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);


Bitmap PCVersion = theScreenShotBitmap;


Graphics theGraphics = Graphics.FromImage(theScreenShotBitmap);


theGraphics.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy); //This part here


theScreenShotBitmap.Save("screenShot.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);

I hope this helps



 
 
folen





PostPosted: .NET Base Class Library, qesutions: moving an img , saveing a screen shoot Top

yes and bookemarked
thank u very much

is the "Screen" in .NET 2.0 only
or where can i find it caz am using
[CODE]
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Drawing.Imaging;
[/CODE]
and am getting an error
and my search shows winform not webform
p.s i have .net 1.xx


 
 
ahmedilyas





PostPosted: .NET Base Class Library, qesutions: moving an img , saveing a screen shoot Top

I think its because you are using webforms. I think you are still a bit unclear on which screenshot you wish to take, the user's if so, then you need to use some client side scripting to do this. Again, ASP.NET would be the place