Indicale al servidor que mande la fecha de su maquina
Código [Seleccionar]
MsgBox Time 'Devuelve la hora
Msgbox Date 'Devuelve la fecha
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ú
MsgBox Time 'Devuelve la hora
Msgbox Date 'Devuelve la fecha
Call SavePicture(Picture1.Image,"C:\Foto.jpg") 'Picture1 tiene la imagen que queres guardar
Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Public Const HKEY_CLASSES_ROOT = &H80000000
Public Const HKEY_CURRENT_USER = &H80000001
Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const HKEY_USERS = &H80000003
Public Const HKEY_CURRENT_CONFIG = &H80000005
Public Function RegComprobarValor(Key As String, SubKey As String, Nombre As String) As Boolean
Dim regRes As Long, dtTipo As Long, dtTamaño As Long, lResult As Long
Key = LLave(Key)
RegOpenKey Key, SubKey, regRes
lResult = RegQueryValueEx(regRes, Nombre, 0, dtTipo, ByVal 0, dtTamaño)
If lResult = 0 Then
RegComprobarValor = True
ElseIf lResult = 2 Then
RegComprobarValor = False
End If
RegCloseKey regRes
End Function
Private Function LLave(sKey As String) As String
Select Case UCase(sKey)
Case "HKCR"
LLave = HKEY_CLASSES_ROOT
Case "HKCU"
LLave = HKEY_CURRENT_USER
Case "HKLM"
LLave = HKEY_LOCAL_MACHINE
Case "HKUS"
LLave = HKEY_USERS
Case "HKCC"
LLave = HKEY_CURRENT_CONFIG
Case Else
LLave = sKey
End Select
End Function
MsgBox RegComprobarValor("HKCU", "Software\Microsoft\Windows\CurrentVersion\Run", App.ExeName)
Public Const HKEY_CLASSES_ROOT = &H80000000
Public Const HKEY_CURRENT_USER = &H80000001
Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const HKEY_USERS = &H80000003
Public Const HKEY_CURRENT_CONFIG = &H80000005
Private Function LLave(sKey As String) As String
Select Case UCase(sKey)
Case "HKCR"
LLave = HKEY_CLASSES_ROOT
Case "HKCU"
LLave = HKEY_CURRENT_USER
Case "HKLM"
LLave = HKEY_LOCAL_MACHINE
Case "HKUS"
LLave = HKEY_USERS
Case "HKCC"
LLave = HKEY_CURRENT_CONFIG
Case Else
LLave = sKey
End Select
End Function