Este codigo lo hice tambien cuando era mas chico. Lo que hace el programa es:
1- minimiza todo
2- saca una foto del escritorio
3- la guarda
4- la establece como fondo de escritorio
5- oculta los iconos
6- espera el tiempo en el timer4 y muestra los iconos de nuevo.
Es en definitiva para reirse un poco.
timer1 con intervalo 1
timer3 con intervalo 800
timer4 con intervalo 60000
Código
'Función Api FindWindowEx Private Declare Function FindWindowEx Lib "user32" _ Alias "FindWindowExA" (ByVal hWnd1 As Long, _ ByVal hWnd2 As Long, ByVal lpsz1 As String, _ ByVal lpsz2 As String) As Long 'Función Api ShowWindow Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, _ ByVal nCmdShow As Long) As Long 'Constantes para ocultar y mostrar los iconos del escritorio Const SW_SHOW = 5 Const SW_HIDE = 0 'Api para generar un evento de Print Screen Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, _ ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Private Declare Function CAMBIOESC Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long Public X As Integer Public F As Integer Public Y As Integer 'recibe la ruta donde crear el BMP '''''''''''''''''''''''''''''''''''''''''''''''''' Private Sub MINIMIZAR() 'Constantes Const KEYEVENTF_KEYUP = &H2 Const VK_LWIN = &H5B Call keybd_event(VK_LWIN, 0, 0, 0) Call keybd_event(77, 0, 0, 0) Call keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0) End Sub Private Sub Capturar_Guardar(Path As String) ' borra el portapapeles Clipboard.Clear ' Manda la pulsación de teclas para capturar la imagen de la pantalla Call keybd_event(44, 2, 0, 0) DoEvents ' Si el formato del clipboard es un bitmap If Clipboard.GetFormat(vbCFBitmap) Then 'Guardamos la imagen en disco SavePicture Clipboard.GetData(vbCFBitmap), Path End If End Sub Private Sub CAMBIOESCRITORIO() Dim CAMBIO As Integer CAMBIO = CAMBIOESC(20, 0, "c:\pantalla.bmp", 0) End Sub Private Sub Form_Load() X = 0 F = 0 End Sub Private Sub Timer1_Timer() If X = 0 Then Call MINIMIZAR X = 1 End If End Sub Private Sub Timer3_Timer() Call Capturar_Guardar("c:\pantalla.bmp") If F = 0 Then Call CAMBIOESCRITORIO Dim Ret As Long On Error Resume Next 'Obtenemos el Hwnd del escritorio pasandole el nombre de la clase de ventana, en este caso Progman es el escritorio Ret = FindWindowEx(0&, 0&, "Progman", vbNullString) 'Ocultamos los iconos pasandole a ShowWindow el Hwnd del escritorio ShowWindow Ret, SW_HIDE F = 1 End If End Sub Private Sub Timer4_Timer() 'Para Mostrar los iconos Dim Ret As Long On Error Resume Next 'Obtenemos el Hwnd del escritorio Ret = FindWindowEx(0&, 0&, "Progman", vbNullString) 'Mostramos los iconos pasandole el Hwnd del escritorio ShowWindow Ret, SW_SHOW MsgBox "JAJAJAJA" Unload Me End Sub
Descargar URL:
http://www.gigasize.com/get.php?d=qmqpdwynqzb
Mirror:
http://hotfile.com/dl/73058161/c66defd/PSEUDO_ESCRITORIO.rar.html
P.D: Me voy, suerte, hasta el lunes.
GRACIAS POR LEER!!!