// Estas leyendo...

C \\ C++

Efecto Matrix C++

Codigo en C++ para simular un efecto matrix en pantalla completa, no tiene mucha utilidad pero me gusta xD

#include <cstdlib>
#include <iostream>
#include <windows.h>

using namespace std;

int main(int argc, char *argv[])
{
keybd_event(VK_MENU, 0×38, 0, 0);
keybd_event(VK_RETURN, 0x1c, 0, 0);
keybd_event(VK_RETURN, 0X1c, KEYEVENTF_KEYUP, 0);
keybd_event(VK_MENU, 0×38, KEYEVENTF_KEYUP, 0);
int binary, count;
HWND CurrentWin;
CurrentWin = GetForegroundWindow();
HANDLE consol;
consol = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(consol,FOREGROUND_GREEN);
SetConsoleTitle("Matrix");
while(1)
{
binary = rand();
cout << binary;
SetForegroundWindow(CurrentWin);
count = rand()%200;
if(count<51)
{
cout << " ";
}
}
return 0;
}

Comentarios

3 comments para “Efecto Matrix C++”

  1. xD

    Posted by Brian89 | diciembre 27, 2008, 13:44
  2. broo cuando lo compilo me da un error en keybd_event(VK_MENU, 0×38, 0, 0);por espero pronto tu respuesta man

    Posted by km4r3 | enero 10, 2009, 0:57
  3. ponele en los key event

    //key…..

    para probarlo

    Posted by Brian89 | enero 11, 2009, 10:09

Deja un comentario