473,443 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

take a screenshot and crop image

i want to take a screenshot of user's desktop, just like printscreen does and crop it, because i just want the system tray of taskbar is it possible? (system tray == notification area)
Jul 31 '09 #1
2 4892
GaryTexmo
1,501 Expert 1GB
Vishal, have a look at the discussion in this thread. This person is having trouble taking screenshots of a DirectX application, but their first post shows code that should take a screenshot of the desktop.

As for cropping, a google search turned out this lovely little block of code for you.
Expand|Select|Wrap|Line Numbers
  1. public Bitmap CropBitmap(Bitmap bitmap, int cropX, int cropY, int cropWidth, int cropHeight)
  2. {
  3.   Rectangle rect = new Rectangle(cropX, cropY, cropWidth, cropHeight);
  4.   Bitmap cropped = bitmap.Clone(rect, bitmap.PixelFormat);
  5.   return cropped;
  6. }
http://www.nerdydork.com/crop-an-ima...-or-vbnet.html
Jul 31 '09 #2
thanks again :D works!
Jul 31 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Kevin Smith | last post by:
Is there a way to "auto-crop" an image in PIL? I have some PNG images with white backgrounds that I want cropped to show only the non-white portion in the center, but I don't see how I can do...
2
by: Mike Mimic | last post by:
Hi! I would like to know if there is some kind of program which would make a screenshot of a web page without use of X Windows. I have a server without X Windows and I would like to have a...
2
by: sandman | last post by:
Is this a one-time deal? Or something you want to do programmatically? If it's a one-time thing (e.g. to create a bitmap that you can then use in your program), just press Print-Screen, then load...
3
by: ACaunter | last post by:
Hi there, I was wondering if there was a way to crop a peice of an ASP.Net Image, allowing the user to zoom in on only a section of the picture?? any help would be appreciated!! thanks --...
6
by: John Salerno | last post by:
I might be way off target even looking into this method for what I need to do, but I'm still a little confused about the description of it: crop im.crop(box) => image Returns a rectangular...
1
by: liuliuliu | last post by:
hi -- sorry if this is trivial -- but how do you make a screenshot of a pygame display? i have a surface which is basically the entire visible screen -- how do you write this surface as an image...
1
by: arunbalait | last post by:
I want to crop an image in VB and to store the cropped image in another image box or any... I want source code samples
2
by: sampath nslabs | last post by:
sir How to crop the image in visual basic 6.0.iam geting in vb.net but i want purelly in vb.plese give the code for that or give me useful snippts.i expecting source code for crop the image .pls...
3
by: fuchsia555 | last post by:
hi is there a code to crop bottom border from an image when creating thumbnail for this image without crop the original image , but just crop 15px bottom border for creating the thumbnails for the...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.