.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Yet another WPF Screen Capture (with Rectangle) App

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :WPF
  The Plan:         I had plan on adapting the following, which is an old Microsoft sample implementing of a rubberband rectangle for my app               http://support.microsoft.com/kb/314945         To simulate a selectable area to capture i would display a wpf window over the entire desktop and make it transparent. Then i would use the window as the surface on which to do the mouse area selection and draw the rubberband rectangle on the mouse move.  I would then pass the point coordinates of the rectangle to this bit of code to do the actual capture. public static BitmapSource Copy(int left, int top, int right, int bottom) { using (var screenBmp = new Bitmap(right - left, bottom - top, PixelFormat.Format32bppArgb)) { using (var bmpGraphics = Graphics.FromImage(screenBmp)) { bmpGraphics.CopyFromScreen(left, top, right, bottom, screenBmp.Size); return Imaging.CreateBitmapSourceFromHBitmap( screenBmp.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); } } } The Malady:         When i make the wpf window transparent i completely loose it as a surfa

View Complete Post

More Related Resource Links

C# reverse connection remote screen capture tool


Hello , I am coding a reverse connection remote screen capture tool.The server can connect to the client but I cannot make screen capture to work. can someone help me out? this is my code :

<strong>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.IO;

namespace ScreenCap_Client
  public partial class Form1 : Form

    private TcpListener captureListener;
    private TcpListener severListener;

    private TcpClient tcpServer;

how to capture Clieck Event using javascript for pop up screen


Hi ,

I have code for popup screen , but i want to capture some value on click also ,from code behind but not able to capture


below are code 








string modaljs = "function " + radarLimitedCtl.ClientID + "OpenEnlargeMapModalPopup() { $('#" + pnlEnlargeRadar.ClientID + "').showModal(); document.getElementById('" + iEnlargeRadar.ClientID + "').src = '/Controls/Radar/Radar.aspx'; } function " + radarLimitedCtl.ClientID + "CloseEnlargeMapModalPopup() { $('#" + pnlEnlargeRadar.ClientID + "').hideMod

Free Mouse from screen capture


The mouse cursor is trapped on the screen. That is, you cannot move it past the edges. For my application I would like to do so. I'm sure there is some simple flag to remove the mouse boundaries but I can't find it.



Snap It! - How to take screen shot using .Net

We all would have used snap shots (screen shots) to illustrate bugs or behavior or something that others could understand by seeing them. For taking snap shots we just hit the "Print Screen" key and copy it to Ms Paint and save it. Ever wondered how to programmatically take a snap shot? Then this article is for you.

PDA Keyboard v1.0 Light Edition - Full Screen Keyboard

The default keypad on Windows Mobile is not at all finger friendly, there is no way you can use it with your fingers. I have trouble using the stylus with it too. But there are many freeware option available to make the SIP ( Software Input Panel - check the Glossary ) finger friendly. Some of these are HTC Diamond keyboard, Blimkeys, PocketCM Keyboard and then now we have PDA Keyboard v1.0 Light Edition from pdamedia.biz. When you hit the blue button it goes into fullscreen mode , then you can use both your hands for typing.

Setting Screen Resolution



  I am developing a website in asp.net.How can i make my web pages view same in different screen resolutions.I am using 1024*768 resolution

Upload a Print Screen?


Is it possible to Print Screen and then immediately Paste into a .NET app and upload to a server?  I'd like to skip the step of the user having to first paste the screen into an image program and save as a jpg, gif, etc.  Thanks!

Detect Browser Screen Size??


Hi Everyone,  I need to detect the size of the user's screen for mobile devices (especially the BlackBerry). I've read a lot of pages that seem to refer me to the Request.Browser object, but I'm finding that this object doesn't have the correct values. For example, I have a BlackBerry and when I use the Request.Browser to get the screen size, it tells me it is 640x480. Well, I know it's not that big since an image of 300px wide just barely fits. Also, when I run on my desktop browser, it also says my screen is 640x480. I can assure you, it is not 640x480! ha!

  How does anyone reliably get the browser's screen size?? Do I have to revert to some kind of JavaScript? If so, where can I read more about it? Will it be any more reliable? Someone must have an idea about this. Thanks in advance!!

Obtain mobile device screen size



I am trying to get the screenHeight and width:


 // Get MobileCapabilities from current Request.Browser
        MobileCapabilities currentCapabilities = (MobileCapabilities)Request.Browser;
        // get a property of the  browser 
        Response.Write(currentCapabilities.ScreenPixelsHeight +  " <br>");
        Response.Write(currentCapabilities.ScreenPixelsWidth  + " <br>");


 but this is always show that the Height is 480 & the width is 640

I am trying on HTC with Opera Mobile 9.5

Any Advice?

Usability in Practice: The Tao of Screen Design


This article describes methods for designing screens in a user interface and the technology frameworks that support screen design.

Ambrose Little, Charles B. Kreitzberg

MSDN Magazine September 2009

Form Filler: Build Workflows to Capture Data and Create Documents


Learn how to create a workflow that uses InfoPath forms and other office documents for passing data to targeted activities and for use in Office documents.

Rick Spiewak

MSDN Magazine June 2008

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend