473,378 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How do I simulate an Alt-PrintScreen

I have a request to add a button that will automatically create an image
copy of the current screen. For whatever reason, the user does not want to
do the Alt-PrintScreen. I would like to associate this with a button to
accomplish the same thing.

Is this possible?
Nov 16 '05 #1
1 6670
Hi John
I don't have a direct answer, but I downloaded some code where the person
was sending key commands using windows API's and I am sure you will be able
to use that in your case.

This is a part of the code you may need, however; I encourage you to
download the authors full project to see how he is using this :-)

[DllImport("user32.Dll")]
public static extern int keybd_event(byte ch,byte scan,int flag,int info);

keybd_event((byte)Keys.PrintScreen,0,0,0);

Author's code
http://www.codeproject.com/cs/media/tambiSR.asp
Henk Verhoeven
http://www.4iam.net

"John Galt" <nf*@nospam.com> wrote in message
news:ec**************@TK2MSFTNGP10.phx.gbl...
I have a request to add a button that will automatically create an image
copy of the current screen. For whatever reason, the user does not want to
do the Alt-PrintScreen. I would like to associate this with a button to
accomplish the same thing.

Is this possible?

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Keeper | last post by:
Hi all, I'm trying to send chars to the current console (currently having cursor focus) - /dev/tty0 - in my program by: my $st = 'K' my $ri = 'L' my $ng = 'J' open(TTY, ">/dev/tty0");...
2
by: Keeper | last post by:
Hi all, I'm trying to send chars to the current console (currently having cursor focus) - /dev/tty0 - in my program by: char st='K',ri='L',ng='J'; int tty; tty = open(">/dev/tty0",...
1
by: charliewest | last post by:
I am trying use server controls or web controls to simulate the following behavior. I've an image wrapped w/in a link to create a rollover effect as if both elements we're one graphic: <a...
61
by: /* frank */ | last post by:
I have to do a homework: make a CPU simulator using C language. I have a set of asm instructions so I have to write a program that should: - load .asm file - view .asm file - do a step by step...
4
by: johnny | last post by:
On a form I would like to simulate a button click when the Enter is pressed. My form is setup and it works if the delegate for the key pressed on the form calls the delegate for the button pressed....
1
by: diegocarpintero | last post by:
I am writing a c# class which main purpose is to simulate the dialog with a GUI-application. The idea is that this class can simulate some user actions like mouse clicks on buttons. I have...
1
by: =?Utf-8?B?UmljYXJkbyBRdWludGFuaWxsYQ==?= | last post by:
how to simulate a different time zone? ¿is it possible by code to simulate that i am in a different time zone just for to execute a few lines of code? in my case i am in the time zone...
3
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, in my code-behind windows project (vs2005) i was wondering if you can simulate the pressing of key combinations (i.e. Alt + S)? thanks, rodchar
3
by: Abdul Khaliq | last post by:
Hi all i want to simulate the ctrl + alt + delete keys I am facing problem with this code. I able to get the reference of the "winlogon" desktop but am unable to simulate the ctrl + alt +...
4
by: c0mm3nt | last post by:
Hi Guys. I'm writing a web crawler (web spider) that crawl all links in a website. My application is a Win32 App, written in C# with .Net framework 3.5. Now I'm using HttpWebRequest an...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.