elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Estamos en la red social de Mastodon


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  [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 1,663 veces)
x64core


Desconectado Desconectado

Mensajes: 1.908


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

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
  1. Private Sub Form_Load()
  2. Dim T As Long
  3.  
  4. T = GetCurrentThreadId()
  5. hook = SetWindowsHookEx(WH_CBT, AddressOf WinProc, App.PrevInstance, T)
  6.  
  7. If SetTimer(Me.hwnd, 0, 100, AddressOf TimerProc) Then Debug.Print Error
  8. End Sub
  9.  
  10. Private Sub Form_Unload(Cancel As Integer)
  11. UnhookWindowsHookEx hook
  12. KillTimer Me.hwnd, 0
  13. End Sub
  14.  

modulo:
Código
  1. Option Explicit
  2.  
  3. 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
  4. Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
  5. Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
  6.  
  7. Declare Function GetCurrentThreadId Lib "kernel32" () As Long
  8. 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
  9. 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
  10. Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long
  11.  
  12. Public Const SWP_NOSIZE = &H1
  13. Public Const SWP_NOZORDER = &H4
  14. Public Const SWP_NOACTIVATE = &H10
  15. Public Const HCBT_ACTIVATE = 5
  16. Public Const WH_CBT = 5
  17. Private Const MB_OK = &H0&
  18.  
  19.  
  20. Dim count           As Integer
  21. Public hook         As Long
  22.  
  23. Sub TimerProc(ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long)
  24. If count = 50 Then Unload Form1
  25.  
  26. count = count + 1
  27. DoEvents
  28. MessageBox hwnd, "Warning", "Example!", MB_OK
  29. End Sub
  30.  
  31. Function WinProc(ByVal lMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  32.  
  33. If lMsg = HCBT_ACTIVATE Then
  34.    SetWindowPos wParam, 1, Rando, Rando, 0, 0, SWP_NOSIZE Or SWP_NOZORDER Or SWP_NOACTIVATE
  35. End If
  36.  
  37. End Function
  38.  
  39. Function Rando() As Integer
  40. Randomize
  41. Rando = Int(1000 - 1) * Rnd
  42. End Function
  43.  
  44.  





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

$Edu$


Desconectado Desconectado

Mensajes: 1.842



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

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


En línea

x64core


Desconectado Desconectado

Mensajes: 1.908


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

bug xD
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
ayuda con el msgBox
Programación Visual Basic
watashi 6 3,194 Último mensaje 8 Julio 2005, 04:35 am
por Slasher-K
Creador de MsgBox « 1 2 »
Programación Visual Basic
‭lipman 10 6,076 Último mensaje 8 Septiembre 2007, 06:24 am
por ranslsad
Send MSGBOX
Programación Visual Basic
papanoel_devacaciones 8 2,857 Último mensaje 7 Octubre 2007, 14:51 pm
por ranslsad
[Ayuda] MsgBox, etc.
Programación Visual Basic
Fraannn 8 2,822 Último mensaje 7 Agosto 2008, 21:23 pm
por seba123neo
Eliminar msgbox.
Ingeniería Inversa
APOKLIPTICO 4 3,878 Último mensaje 8 Octubre 2008, 21:18 pm
por APOKLIPTICO
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines