Menú

Mostrar Mensajes

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ú

Mensajes - seba123neo

#2681
sobre un degradado de fondo queda bueno...ahi es bien util..
#2682
el checkbox no tiene la propiedad de transparencia..por eso.. :xD
#2683
lo terminaste veo...muy bueno..che yo tengo el IDE de visual basic con el tema XP y los option no los hace transparente del todo, es por lo circular...queda como un borde...igual no importa esta bien..

PD:la imagen de fondo terrible!! :xD :xD

saludos.
#2684
recomiendo leer un manual de visual basic...

Código (vb) [Seleccionar]
Open "C:\WarezP2P_DLC.exe" For Binary Access Write As #1
#2685
Hola, conecta el datagrid devuelta al origen de datos...

saludos.
#2686
la misma statusbar tiene para crear los paneles y agregarles los iconos...y para detectar no se si tiene una propiedad para eso, le debe preguntar a http://www.ssl.com...

saludos.
#2687
espera un rato para ver el mensaje..porque lo puso como marco.. :xD :xD :xD
#2688
si usas el CSocketMaster no tenes que usar el winsock y lo mas coherente es que si usas CSocketMaster usala en el servidor y en el cliente tambien...
#2689
jaja y yo cai como un tortolito por un rato... :xD :xD
#2690
si yo decia lo mismo, pero sin timer...cuando detecte que existe que lo elimine, yo hice un programa asi que detecta cuando existe o se cambia un archivo...esperame que edito el post y te paso un ejemplo:

necesitas 2 botones, uno para emepezar y el otro para parar el monitoreo de la carpeta..


Código (vb) [Seleccionar]
Option Explicit

Private Const TIME_OUT = &H102
Private Const FILE_SHARE_DELETE = &H4
Private Const FILE_SHARE_READ = &H1
Private Const FILE_SHARE_WRITE = &H2
Private Const FILE_ALL_ACCESS = &H1FF

Private Const FILE_LIST_DIRECTORY = &H1
Private Const OPEN_EXISTING = &H3
Private Const FILE_FLAG_BACKUP_SEMANTICS = &H2000000
Private Const FILE_FLAG_OVERLAPPED = &H40000000
Private Const FILE_ATTRIBUTE_NORMAL = &H80

Private Enum FILE_NOTIFY_CHANGE
    FILE_NOTIFY_CHANGE_FILE_NAME = &H1
    FILE_NOTIFY_CHANGE_DIR_NAME = &H2
    FILE_NOTIFY_CHANGE_ATTRIBUTES = &H4
    FILE_NOTIFY_CHANGE_SIZE = &H8
    FILE_NOTIFY_CHANGE_LAST_WRITE = &H10
    FILE_NOTIFY_CHANGE_LAST_ACCESS = &H20
    FILE_NOTIFY_CHANGE_CREATION = &H40
    FILE_NOTIFY_CHANGE_SECURITY = &H100
End Enum

Private Enum FILE_ACTION
    FILE_ACTION_ADDED = &H1
    FILE_ACTION_REMOVED = &H2
    FILE_ACTION_MODIFIED = &H3
    FILE_ACTION_RENAMED_OLD_NAME = &H4
    FILE_ACTION_RENAMED_NEW_NAME = &H5
End Enum

Private Type OVERLAPPED
    Internal As Long
    InternalHigh As Long
    offset As Long
    OffsetHigh As Long
    hEvent As Long
End Type

Private Type FILE_NOTIFY_INFORMATION
    dwNextEntryOffset As Long
    dwAction As FILE_ACTION
    dwFileNameLength As Long
    wcFileName(1024 - 1) As Byte 'Buffer de 1024 bytes
End Type

Private Declare Function ResetEvent Lib "kernel32" (ByVal hEvent As Long) As Long
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CreateEvent Lib "kernel32" Alias "CreateEventA" (ByVal lpEventAttributes As Long, ByVal bManualReset As Long, ByVal bInitialState As Long, ByVal lpName As String) As Long
Private Declare Function GetOverlappedResult Lib "kernel32" (ByVal hFile As Long, lpOverlapped As OVERLAPPED, lpNumberOfBytesTransferred As Long, ByVal bWait As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, ByVal lpSecurityAttributes As Long, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
Private Declare Function ReadDirectoryChangesW Lib "kernel32.dll" (ByVal hDirectory As Long, ByVal lpBuffer As Long, ByVal nBufferLength As Long, ByVal bWatchSubtree As Boolean, ByVal dwNotifyFilter As FILE_NOTIFY_CHANGE, lpBytesReturned As Long, ByVal lpOverlapped As Long, ByVal lpCompletionRoutine As Long) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal Destination As Long, ByVal Source As Long, ByVal Length As Long)

'Variable para el monitoreo
Dim fstop As Boolean

Private Sub Command1_Click()

    Dim hDir As Long 'Handle del Directorio
    Dim hEvent As Long 'Handle del Evento
   
    fstop = False
   
    'aca pones la carpeta a monitorear y le pasa todos los flags
    hDir = CreateFile("C:\", FILE_LIST_DIRECTORY, FILE_SHARE_READ Or FILE_SHARE_DELETE Or FILE_SHARE_WRITE, 0&, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS Or FILE_FLAG_OVERLAPPED, 0&)
   
    'Crea el evento
    hEvent = CreateEvent(0&, True, True, "DirEvent")
   
    Dim oLap As OVERLAPPED
   
    With oLap
        .hEvent = hEvent
    End With
   
    Dim buf(0 To 1024 * 5 - 1) As Byte
   
    'para obtener la info del archivo
    Dim dirBuf As FILE_NOTIFY_INFORMATION
   
    Dim nUsed As Long
   
    Call ReadDirectoryChangesW(hDir, VarPtr(buf(0)), UBound(buf) + 1, True, FILE_NOTIFY_CHANGE_FILE_NAME, nUsed, VarPtr(oLap), 0&)
       
    Dim bstr As String 'para el nombre del archivo
    Dim pos As Long 'para la ruta
    Dim ret As Long
   
    Do
        pos = 0
        'esperamos un evento
        ret = WaitForSingleObject(hEvent, 100)
        If ret <> TIME_OUT Then
            CopyMemory VarPtr(dirBuf), VarPtr(buf(pos)), Len(dirBuf)
            Debug.Print dirBuf.dwFileNameLength & " " & dirBuf.dwNextEntryOffset
           
            Select Case dirBuf.dwAction
                Case FILE_ACTION_ADDED:
                    Debug.Print "Creaste ";
                Case FILE_ACTION_MODIFIED:
                    Debug.Print "Modificaste ";
                Case FILE_ACTION_REMOVED:
                    Debug.Print "Borraste ";
                Case FILE_ACTION_RENAMED_NEW_NAME:
                    Debug.Print "Renombraste a ";
                Case FILE_ACTION.FILE_ACTION_RENAMED_OLD_NAME:
                    Debug.Print "Nombre Anterior ";
            End Select

            bstr = dirBuf.wcFileName
            bstr = Left(bstr, dirBuf.dwFileNameLength / 2)
            Debug.Print bstr
           
            While dirBuf.dwNextEntryOffset <> 0
           
                pos = pos + dirBuf.dwNextEntryOffset
                CopyMemory VarPtr(dirBuf), VarPtr(buf(pos)), Len(dirBuf)
               
                Debug.Print dirBuf.dwFileNameLength & " " & dirBuf.dwNextEntryOffset
               
                Select Case dirBuf.dwAction
                    Case FILE_ACTION_ADDED:
                        Debug.Print "Creaste ";
                    Case FILE_ACTION_MODIFIED:
                        Debug.Print "Modificaste ";
                    Case FILE_ACTION_REMOVED:
                        Debug.Print "Borraste ";
                    Case FILE_ACTION_RENAMED_NEW_NAME:
                        Debug.Print "Renombraste a ";
                    Case FILE_ACTION.FILE_ACTION_RENAMED_OLD_NAME:
                        Debug.Print "Nombre Anterior ";
                End Select
               
                bstr = dirBuf.wcFileName
                bstr = Left(bstr, dirBuf.dwFileNameLength / 2)
                Debug.Print bstr
            Wend
           
            'reseteamos y volvemos a empezar
            ResetEvent hEvent
            Call ReadDirectoryChangesW(hDir, VarPtr(buf(0)), UBound(buf) + 1, True, FILE_NOTIFY_CHANGE_FILE_NAME, nUsed, VarPtr(oLap), 0&)
        End If
        DoEvents
    Loop While Not fstop
   
    'Cerramos los Handles
    CloseHandle hEvent
    CloseHandle hDir
End Sub

Private Sub Command2_Click()
    'paramos el monitoreo
    fstop = True
End Sub

Private Sub Form_Unload(Cancel As Integer)
    'empezamos el monitoreo
    fstop = True
End Sub


saludos.