YO llevo 2 semanas
Quien da menos?
Quien da menos?
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúOption Explicit
Dim Cont As Long, Dire As Byte
Private Declare Function SetWindowPos Lib "user32" _
(ByVal hWnd As Long, ByVal hWndREPLACEAfter As Long, _
ByVal X As Long, ByVal Y As Long, ByVal cx As Long, _
ByVal cy As Long, ByVal wFlags As Long) As Long
Private Const SWP_NOMOVE = 2
Private Const SWP_NOSIZE = 1
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Sub Form_Load()
Timer1.Interval = 20
Me.Left = 14070
Me.Top = 15585
VentanaSiempreFregando Me.hWnd
Dire = 1
Cont = 0
End Sub
Private Sub Timer1_Timer()
If Dire = 1 Then
Me.Top = Me.Top - 50
Cont = Cont + 1
If Cont = 50 Then
Dire = 2
Cont = 0
End If
End If
If Dire = 2 Then
Cont = Cont + 1
If Cont = 100 Then
Dire = 3
Cont = 0
End If
End If
If Dire = 3 Then
Me.Top = Me.Top + 50
Cont = Cont + 1
If Cont = 50 Then
End
End If
End If
End Sub
Public Sub VentanaSiempreFregando(hWnd As Long)
SetWindowPos hWnd, HWND_TOPMOST, _
0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
End Sub
Public Sub VentanaNormal(hWnd As Long)
SetWindowPos hWnd, HWND_NOTOPMOST, _
0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
End Sub