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ú
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Option Explicit
Private Const FILE_NOTIFY_CHANGE_ATTRIBUTES = &H4
Private Const FILE_NOTIFY_CHANGE_DIR_NAME = &H2
Private Const FILE_NOTIFY_CHANGE_FILE_NAME = &H1
Private Const FILE_NOTIFY_CHANGE_SIZE = &H8
Private Const FILE_NOTIFY_CHANGE_LAST_WRITE = &H10
Private Const FILE_NOTIFY_CHANGE_SECURITY = &H100
Private Const FILE_NOTIFY_CHANGE_ALL = &H4 Or &H2 Or &H1 Or &H8 Or &H10 Or &H100
Private Const INFINITE = &HFFFFFFFF
Private Const OBJECT_WAIT_0 = 0
Private Const INVALID_HANDLE_VALUE = -1
Declare Function FindFirstChangeNotification Lib "kernel32" Alias "FindFirstChangeNotificationA" (ByVal lpPathName As String, ByVal bWatchSubtree As Long, ByVal dwNotifyFilter As Long) As Long
Declare Function FindNextChangeNotification Lib "kernel32" (ByVal hChangeHandle As Long) As Long
Declare Function FindCloseChangeNotification Lib "kernel32" (ByVal hChangeHandle As Long) As Long
Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds 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
Private bFileMonEnabled As Boolean
Sub Main()
Call StartFileMon
Call frmMain.Show
End Sub
Sub FileMonProc(ByVal hWnd As Long, ByVal uMsg As Long, ByVal idEvent As Long, ByVal dwTime As Long)
Dim r&, hMon&
r = KillTimer(0&, idEvent)
bFileMonEnabled = True
hMon = FindFirstChangeNotification("C:\WINDOWS", True, FILE_NOTIFY_CHANGE_ALL)
Do While bFileMonEnabled
r = WaitForSingleObject(hMon, 100&)
If r = OBJECT_WAIT_0 Then
r = FindNextChangeNotification(hMon)
'Se modificó el directorio.
'
End If
DoEvents
Loop
r = FindCloseChangeNotification(hMon)
End Sub
Sub StartFileMon()
If Not bFileMonEnabled Then
Call SetTimer(0&, 0&, 0&, AddressOf FileMonProc)
End If
End Sub
Sub StopFileMon()
bFileMonEnabled = False
End Sub
Propery Get ScreenX() As Single
'Devuelve el ancho de la pantalla.
'
ScreenX = Screen.Width / Screen.TwipsPerPixelX
End Property
Propery Get ScreenY() As Single
'Devuelve el alto de la pantalla.
'
ScreenX = Screen.Height / Screen.TwipsPerPixelY
End Property