Quisiera saber si hay alguana forma de cuando editen un archivo o intenten renombrarlo o x cosa y que me de una alerta en pantalla desde vb o de cualquier otra forma.
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ú
If txtTel1.Text <> "" Then
SQL = "%" & txtTel1.Text & "%"
AdoAgenda.RecordSource = "SELECT * From AGENDA_TELEFONICA WHERE Nombre_age like '" & Trim(SQL) & "' order by Cod_age Asc"
AdoAgenda.Refresh
End If
If txtTel1.Text = "" Then
AdoAgenda.RecordSource = "SELECT * From AGENDA_TELEFONICA order by Cod_age Asc"
AdoAgenda.Refresh
End If
Adodc1.Recordset.Find "RAZON =" & "%" & Text1.Text & "%"
DiaActual = Day(Now)
AnoActual = Year(Now)
MesActual = Month(Now)
Fecha = "Dia: " + CStr(DiaActual) + " Mes: " + CStr(MesActual) + " Año: " + CStr(AnoActual)
'colores y resolucion
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
Private Type tResol
Width As Long
Height As Long
Bits As Integer
End Type
Private Disponibles() As tResol
Private Declare Function EnumDisplaySettings Lib "user32" Alias "EnumDisplaySettingsA" (ByVal lpszDeviceName As Long, ByVal iModeNum As Long, lpDevMode As Any) As Boolean
Private Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDisplaySettingsA" (lpDevMode As Any, ByVal dwflags As Long) As Long
Const CCDEVICENAME = 32
Const CCFORMNAME = 32
'Las declaraciones de estas constantes están en: Wingdi.h
Const DM_BITSPERPEL = &H40000
Const DM_PELSWIDTH = &H80000
Const DM_PELSHEIGHT = &H100000
Private Type DEVMODE
dmDeviceName As String * CCDEVICENAME
dmSpecVersion As Integer
dmDriverVersion As Integer
dmSize As Integer
dmDriverExtra As Integer
dmFields As Long
dmOrientation As Integer
dmPaperSize As Integer
dmPaperLength As Integer
dmPaperWidth As Integer
dmScale As Integer
dmCopies As Integer
dmDefaultSource As Integer
dmPrintQuality As Integer
dmColor As Integer
dmDuplex As Integer
dmYResolution As Integer
dmTTOption As Integer
dmCollate As Integer
dmFormName As String * CCFORMNAME
dmUnusedPadding As Integer
dmBitsPerPel As Integer
dmPelsWidth As Long
dmPelsHeight As Long
dmDisplayFlags As Long
dmDisplayFrequency As Long
End Type
Dim DevM As DEVMODE
en el load
'para saber la resolucion de la pantalla y hacer la recomendacion
Dim Mensaje As String
Dim Col, bit, largo, alto As Integer
Col = GetDeviceCaps(frmMainMenu.hdc, 12)
largo = GetDeviceCaps(frmMainMenu.hdc, 8)
alto = GetDeviceCaps(frmMainMenu.hdc, 10)
'Mostrar las resoluciones disponibles
Dim A As Boolean
Dim i As Long
i = 0
Do
A = EnumDisplaySettings(0&, i&, DevM)
i = i + 1
If A Then
ReDim Preserve Disponibles(i - 1)
With Disponibles(i - 1)
.Width = DevM.dmPelsWidth
.Height = DevM.dmPelsHeight
.Bits = DevM.dmBitsPerPel
End With
End If
Loop While A
If largo > 800 Or alto > 600 Then 'cambiar resolocion automaticamente
If AdoOption.Recordset.Fields("Cambiar_Resolucion_800X600_opt") = True Then
Call cmdCambiarResolucion_Click
Exit Sub
End If
End If
Private Sub cmdCambiarResolucion_Click()
'Exit Sub
'Cambiar a la resolución indicada
Dim i As Long
'Si sólo se quiere cambiar la resolución,
'manteniendo los colores:
DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT
DevM.dmPelsWidth = 800
DevM.dmPelsHeight = 600
DevM.dmBitsPerPel = 24
Call ChangeDisplaySettings(DevM, 0)
End Sub