Friday, May 28, 2010
Wednesday, May 19, 2010
How to take ScreenShot in C#
From this article I have copied the code below for taking a screenshot. I have not yet tested this code, because I do not reminder where I need this... when I do I will update this post:)
here is the code in C# for screenshot.
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("test.jpg", ImageFormat.Jpeg);
here is the code in C# for screenshot.
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("test.jpg", ImageFormat.Jpeg);
Friday, April 30, 2010
.NET Framework 4
Since the beginning of this month is .NET Framework 4 released. When migrating to a newer version of the framework, there are always some issues. These issues are listed on the MSDN site. Hope it helps!
Update: Some changes from another view
Update: Some changes from another view
Thursday, March 25, 2010
Embedded Resources
When you work with embedded resource, you can use the following code to get a list of all the embedded resources in de current assembly:
More info on How to use assemlby embedded resources
foreach (string s in this.GetType().Assembly.GetManifestResourceNames())
System.Diagnostics.Debug.WriteLine(s);
More info on How to use assemlby embedded resources
Friday, March 12, 2010
Check your web.config
Check your web.config on these common mistakes which occurs in the web.configs.
IIS 7 and IIS 7.5
The IIS version for Windows Server 2008 (Vista) is IIS7 and the IIS version for Windows Server 2008 R2 (Windows 7) is IIS 7.5. read more information about specific details. At the moment it is not clear for me what the difference are for configuring a web application in IIS 7 and IIS7.5, specially for the web.config. When I know more about this, I will blog this....
Browser capabilities
Test your browser capabilities on this site. When you use the Developer Toolbar for disabling Javascript or CSS support you can see the results on this page. Also useful for crossbrowsing web development.
Subscribe to:
Posts (Atom)