[Help] Pressing Print screen?[Solved]

Posts 1–15 of 24 · Page 1 of 2
[Help] Pressing Print screen?[Solved]
Is there any codes that can press Print screen or a code that can capture the whole screen??

as my print screen is f*cking broken...

thanks..
[php]
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include <string>
#include <iostream>
#define PRINTF 0x2C

using namespace std;

bool whileLoop1 = false;

int _tmain(int argc, _TCHAR* argv[])
{

whileLoop1 = true;
while(whileLoop1 == true)
{
bool Exit = GetAsyncKeyState('E');
bool PRINTS = GetAsyncKeyState('S');

if(Exit)
{
break;
}
if(PRINTS)
{
string Text = "PrintScreen Succesfull.";
cout << Text << endl;
keybd_event(VK_SNAPSHOT,0,0,0);
Sleep(100);
}
}
return 0;
}
[/php]

its C++ but this can be placed in a console application,
Controls:
S - for PrintScreen
E - to Exit the program.

all what this does is simulate a button. if im correct u can do this with VB too
Code:
Sendkeys.Send(VK_SNAPSHOT)
Try something like this for direct capture:

[php]
Dim screenRectangle = My.Computer.Screen.Bounds
Dim myBmp As New Bitmap(screenRectangle.Width, screenRectangle.Height)
Using mGraphics As Graphics = Graphics.FromImage(myBmp)
mGraphics.CopyFromScreen(New Point(0, 0), Point.Empty, screenRectangle.Size)
End Using
Clipboard.SetImage(myBmp)
[/php]

OR simply:

[php]
SendKeys.Send(Keys.Printscreen)
[/php]


Quote Originally Posted by Kuro Tenshi View Post
[php]
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include <string>
#include <iostream>
#define PRINTF 0x2C

using namespace std;

bool whileLoop1 = false;

int _tmain(int argc, _TCHAR* argv[])
{

whileLoop1 = true;
while(whileLoop1 == true)
{
bool Exit = GetAsyncKeyState('E');
bool PRINTS = GetAsyncKeyState('S');

if(Exit)
{
break;
}
if(PRINTS)
{
string Text = "PrintScreen Succesfull.";
cout << Text << endl;
keybd_event(VK_SNAPSHOT,0,0,0);
Sleep(100);
}
}
return 0;
}
[/php]

its C++ but this can be placed in a console application,
Controls:
S - for PrintScreen
E - to Exit the program.

all what this does is simulate a button. if im correct u can do this with VB too
Code:
Sendkeys.Send(VK_SNAPSHOT)
Please, keep C++ in the C++ section for god's sake.
ahw... this SendKeys.Send(Keys.Printscreen) :/ well mine is below idk if this is correct /

[php]Public Class Main_Form 'or console app :/'

Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Dim Exit as Boolean = GetAsyncKeystate(Keys.E)
Dim PRINTS as Boolean = GetAsyncKeyState(Keys.S)

Private Sub Main_Form_Load(Byval Sender as System.object, Byval e Systen.EventArgs) Handles MyBase.Load
Timerx.Start
end sub
Private Sub Timerx_Tick(Byval Sender as System.object, Byval e Systen.EventArgs) Handles Timerx.Tick 'x = probably 1...'
if Exit = True then
Me.Close()
End If
if PRINTS = True then
SendKeys.Send(VK_SNAPSHOT)
Textboxx.Text += "SnapShot Taken." & VB_Return 'or something...'
System.Threading.Thread.Sleep(100)
'SendKeys.Send(0x2C)'
End If
End Sub[/php]

Quote Originally Posted by Jason View Post
Please, keep C++ in the C++ section for god's sake.
was bussy on a translation :>
Quote Originally Posted by Kuro Tenshi View Post
ahw... this SendKeys.Send(Keys.Printscreen) :/ well mine is below idk if this is correct /

[php]Public Class Main_Form 'or console app :/'

Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Dim Exit as Boolean = GetAsyncKeystate("{E}")
Dim PRINTS as Boolean = GetAsyncKeyState("{S}")

Private Sub Main_Form_Load(Byval Sender as System.object, Byval e Systen.EventArgs) Handles Main_Form.Load
Timerx.Start
end sub
Private Sub Timerx_Start(Byval Sender as System.object, Byval e Systen.EventArgs) Handles Timerx.Start 'x = probably 1...'
if Exit = True then
Me.Close()
End If
if PRINTS = True then
SendKeys.Send(VK_SNAPSHOT)
Textboxx.Text += "SnapShot Taken." & VB_Return 'or something...'
System.Threading.Thread.Sleep(100)
'SendKeys.Send(0x2C)'
End If
End Sub[/php]



was bussy on a translation :>
Most of this won't even work as half of it is still C++

VB doesn't use the VK_ for keys, there's the keys class for that. also, 0x2C is the notation used in C++ but VB is &H2C, VB_Return doesn't exist. Why not open your IDE first and check if the code you're "helping" with actually compiles
Quote Originally Posted by Jason View Post


Most of this won't even work as half of it is still C++

VB doesn't use the VK_ for keys, there's the keys class for that. also, 0x2C is the notation used in C++ but VB is &H2C, VB_Return doesn't exist. Why not open your IDE first and check if the code you're "helping" with actually compiles
nahw i knowz didnt use the compiler + refining it :> + booleans not effective here either.
Quote Originally Posted by Kuro Tenshi View Post

nahw i knowz didnt use the compiler + refining it :> + booleans not effective here either.
So you knew that the code had no chance of compiling...what was the point in posting it then?
Quote Originally Posted by Jason View Post


So you knew that the code had no chance of compiling...what was the point in posting it then?
now i tested it the code it self @ the top was actually good enough but the problem was SendKeys doesnt work.

so prob the code that u posted first should be used then

btw whats wrong with C++ if it works eventhough its the wrong section it still does helps the person not /
Quote Originally Posted by Kuro Tenshi View Post

now i tested it the code it self @ the top was actually good enough but the problem was SendKeys doesnt work.

so prob the code that u posted first should be used then

btw whats wrong with C++ if it works eventhough its the wrong section it still does helps the person not /
For God's Sake Kallisti...
Quote Originally Posted by Hassan View Post


For God's Sake Kallisti...
he is pspiso lol not kallisti
Quote Originally Posted by 'Bruno View Post
he is pspiso lol not kallisti
OMG lol...but he acting like kallisti so...
Quote Originally Posted by Kuro Tenshi View Post

now i tested it the code it self @ the top was actually good enough but the problem was SendKeys doesnt work.

so prob the code that u posted first should be used then

btw whats wrong with C++ if it works eventhough its the wrong section it still does helps the person not /
What's wrong with posting a different language solution? /ed
It was asked for in this section, so clearly he wants to get a solution IN VISUAL BASIC not shit++ (just kidding, it's not shit /). It's like me going into the C++ section and posting windows forms solutions to fricken .dll problems It's not what he asked for.

@Hassan, he's the cool story bro guy
Lol, just call it using sendkeys, not that hard.. I tried it :3 I also made it so it creates an image with the clipboard data /me xD

But NO SPOONFEEDING is my rule now :$
Quote Originally Posted by Hawk_ View Post
Lol, just call it using sendkeys, not that hard.. I tried it :3 I also made it so it creates an image with the clipboard data /me xD

But NO SPOONFEEDING is my rule now :$
To late, I already did /
Yeah i know xD
Posts 1–15 of 24 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us