This site is no longer active, all members have migrated to devotedcheating.com . Thankyou



 
Actionhacks.netHomeFAQRegisterLog in

Share | 
 

 Basic 'Block User Input' program.

Go down 
AuthorMessage
Tate
Admin
Admin
avatar

Posts : 208
Reputation : 17
Join date : 2009-09-19
Age : 22

PostSubject: Basic 'Block User Input' program.   Fri Nov 27, 2009 3:19 pm

This program disables the mouse and keyboard's input for 5 seconds.


first type your includes:

Code:
#include <windows.h>
#include <winable.h>
#include <stdio.h>


Next create your main: (ill put comments in)
Code:

int main()
{
Sleep(1000);//pause for 1000 milliseconds (one second), before it blocks input
BlockInput(true);//blocks input
Sleep(5000);//pauses for 5000 milliseconds (5 seconds), before it unblocks input
BlockInput(false);//unblocks input
return 0;//ends program
}

Source Code:

Code:
#include <windows.h>
#include <winable.h>
#include <stdio.h>

int main()
{
Sleep(1000);
BlockInput(true);
Sleep(5000);
BlockInput(false);
return 0;
}





You do NOT need to add
Code:
using namespace std;
for this part of the code, or at least in dev C++.

If you want to add it, that's fine, it will still work. (and you can add console commands, etc.)



This is for educational purposes only.

_________________
"Never pick a fight with an idiot. They'll simply bring you down to their level, then win by experience."
___________________________________
Back to top Go down
 
Basic 'Block User Input' program.
Back to top 
Page 1 of 1
 Similar topics
-
» Jester java chess program
» Ten Basic Checkmates to Know
» Game names vs user names - MMUFF
» Stockfish No.1 It's Senseless to Buy a Chess Program!
» Visual Basic Chess

Permissions in this forum:You cannot reply to topics in this forum
 :: Public Section: Coding :: C++ :: Tutorials-
Jump to: