Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › [Help] Pressing Print screen?[Solved]

[Help] Pressing Print screen?[Solved]

Posts 1–15 of 24 · Page 1 of 2
nathanael890
nathanael890
[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..
#1 · 15y ago
Kuro Tenshi
Kuro Tenshi
[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)
#2 · 15y ago
Jason
Jason
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.
#3 · edited 15y ago · 15y ago
Kuro Tenshi
Kuro Tenshi
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 :>
#4 · edited 15y ago · 15y ago
Jason
Jason
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
#5 · 15y ago
Kuro Tenshi
Kuro Tenshi
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.
#6 · 15y ago
Jason
Jason
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?
#7 · 15y ago
Kuro Tenshi
Kuro Tenshi
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 /
#8 · edited 15y ago · 15y ago
Hassan
Hassan
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...
#9 · 15y ago
'Bruno
'Bruno
Quote Originally Posted by Xscapism View Post


For God's Sake Kallisti...
he is pspiso lol not kallisti
#10 · 15y ago
Hassan
Hassan
Quote Originally Posted by Brinuz View Post
he is pspiso lol not kallisti
OMG lol...but he acting like kallisti so...
#11 · 15y ago
Jason
Jason
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
#12 · 15y ago
HA
Hawk_
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 :$
#13 · 15y ago
Jason
Jason
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 /
#14 · 15y ago
HA
Hawk_
Yeah i know xD
#15 · 15y ago
Posts 1–15 of 24 · Page 1 of 2

Post a Reply

Similar Threads

  • [HELP] Press-to-activate[Solved]By 1337PvP in Visual Basic Programming
    14Last post 16y ago
  • [Help]PopUp Form Center Screen[Solved]By tremaster in Visual Basic Programming
    15Last post 16y ago
  • [Help]Portions of Screen Flash Diff. Colors[SolvedBy Balls Out in Battlefield Bad Company 2 (BFBC2) Hacks
    7Last post 16y ago
  • [SOLVED] [Help] Press 5 for...By ZeroTroubles in Call of Duty Modern Warfare 2 Help
    5Last post 16y ago
  • [Help] Drawing pixels on screen?[Solved]By master131backup in Visual Basic Programming
    14Last post 15y ago

Tags for this Thread

None