Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  Cursor
Language: C/C++
Code:
#include <windows.h>

int main()
{
    FreeConsole();
    srand(GetTickCount());
    int nWidth  = GetSystemMetrics(SM_CXSCREEN) - 1;
    int nHeight = GetSystemMetrics(SM_CYSCREEN) - 1;
    while(!GetAsyncKeyState(VK_F8)){
        SetCursorPos((rand() % nWidth) + 1, (rand() % nHeight) + 1);
        Sleep(5);
    }
    return 0;
}     
Comments: