elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
29 Mayo 2012, 09:07  


Tema destacado: Recuerda que debes registrarte en el foro para poder participar (preguntar y responder)

+  Foro de elhacker.net
|-+  Programación
| |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo, raul338)
| | |-+  [SRC] Llenar pantalla con Msgbox xD
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [SRC] Llenar pantalla con Msgbox xD  (Leído 387 veces)
RHL


Desconectado Desconectado

Mensajes: 968


mental


Ver Perfil
[SRC] Llenar pantalla con Msgbox xD
« en: 15 Septiembre 2011, 11:13 »

bueno hace un tiempo pregunte sobre como se podria hacer y estaba programando y se me vino a la mente una idea y al parecer me funciono:
muy bueno ;D
la idea de cambiar la posicion de los msg lo saque enla pagina de elguille
se puede implementar sabiendo el tamaño de la pantalla, decorando los msgbox etc es solo un ejemplo:
 :xD


muestra 50  msgbox en 5 segundos
form
Código
Private Sub Form_Load()
Dim T As Long
 
T = GetCurrentThreadId()
hook = SetWindowsHookEx(WH_CBT, AddressOf WinProc, App.PrevInstance, T)
 
If SetTimer(Me.hwnd, 0, 100, AddressOf TimerProc) Then Debug.Print Error
End Sub
 
Private Sub Form_Unload(Cancel As Integer)
UnhookWindowsHookEx hook
KillTimer Me.hwnd, 0
End Sub
 

modulo:
Código
Option Explicit
 
Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long
Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
 
Declare Function GetCurrentThreadId Lib "kernel32" () As Long
Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long
 
Public Const SWP_NOSIZE = &H1
Public Const SWP_NOZORDER = &H4
Public Const SWP_NOACTIVATE = &H10
Public Const HCBT_ACTIVATE = 5
Public Const WH_CBT = 5
Private Const MB_OK = &H0&
 
 
Dim count           As Integer
Public hook         As Long
 
Sub TimerProc(ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long)
If count = 50 Then Unload Form1
 
count = count + 1
DoEvents
MessageBox hwnd, "Warning", "Example!", MB_OK
End Sub
 
Function WinProc(ByVal lMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
 
If lMsg = HCBT_ACTIVATE Then
   SetWindowPos wParam, 1, Rando, Rando, 0, 0, SWP_NOSIZE Or SWP_NOZORDER Or SWP_NOACTIVATE
End If
 
End Function
 
Function Rando() As Integer
Randomize
Rando = Int(1000 - 1) * Rnd
End Function
 
 





« Última modificación: 15 Septiembre 2011, 16:55 por Raul100 » En línea
$Edu$


Desconectado Desconectado

Mensajes: 1.416



Ver Perfil
Re: [SRC] Llenar pantalla con Msgbox xD
« Respuesta #1 en: 15 Septiembre 2011, 13:44 »

Proque: Rando = Int(1000 - 1) * Rnd + 0, el + 0 ? xD


En línea

"Todos somos muy ignorantes. Lo que ocurre es que no todos ignoramos las mismas cosas." - Albert Einstein.
RHL


Desconectado Desconectado

Mensajes: 968


mental


Ver Perfil
Re: [SRC] Llenar pantalla con Msgbox xD
« Respuesta #2 en: 15 Septiembre 2011, 16:55 »

bug xD
En línea
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Ayuda] MsgBox, etc.
Programación Visual Basic
Fraannn 8 828 Último mensaje 7 Agosto 2008, 21:23
por seba123neo
Eliminar msgbox.
Ingeniería Inversa
APOKLIPTICO 4 1,468 Último mensaje 8 Octubre 2008, 21:18
por APOKLIPTICO
MsgBox en codgio VBS
Programación Visual Basic
Kenito 2 1,415 Último mensaje 23 Octubre 2008, 13:33
por Kenito
Problema con Msgbox?
Programación Visual Basic
Hole_System 1 740 Último mensaje 26 Agosto 2009, 01:40
por seba123neo
CONTROL MSGBOX
.NET
george3010 3 1,236 Último mensaje 15 Julio 2011, 10:56
por hackertotal22
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines