elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Recopilación Tutoriales y Manuales Hacking, Seguridad, Privacidad, Hardware, etc


  Mostrar Mensajes
Páginas: 1 ... 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 [49] 50 51 52 53
481  Programación / Programación Visual Basic / Re: Sacar datos de una variable en: 10 Octubre 2006, 15:37 pm
puedes usar la instrucción mid


dim s as string

s= mid ("Soplame la papirola", 12, 8)

o la instruccion right
s= mid ("Soplame la papirola", 8)

482  Programación / Programación Visual Basic / Re: Correo desde Visual Basic???? en: 10 Octubre 2006, 15:35 pm
por fin he encontrado la forma de enviar el correo, el codigo lo saque de un ejemplo de esta pag http://www.controltotal.org/VB/tipos/Pinternet.htm


Private Sub btnSend_Click()
    Winsock1.RemoteHost = txHost
    Winsock1.RemotePort = 25
    Winsock1.Connect
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    '   this is the main processing code for
    '   sending an email message
    '   the iState variable maintains the current
    '   state of the protocol exchange so that we
    '   know what to send next
    Dim strData As String
    Static iState       As Integer
    Dim iMsgNum         As Integer
    Dim szMsg           As String
    Dim I               As Integer
   
    Winsock1.GetData strData, vbString
   
    iMsgNum = Val(Left(strData, InStr(strData, " ")))
   
    Select Case iMsgNum
        Case 220    '   initial message
            Winsock1.SendData "HELO " & txHost & vbCrLf
            txStatus = "Mail Server is ready..."
            iState = 1
        Case 221
            If iState = 999 Then
                txStatus = "Disconnected from mail server after error..."
            Else
                txStatus = "Disconnected from mail server..."
            End If
            iState = 0
           
        Case 250
            Select Case iState
                Case 1:
                    Winsock1.SendData "MAIL FROM:<" & txFrom & ">" & vbCrLf
                    Debug.Print "MAIL FROM:<" & txFrom & ">" & vbCrLf
                    txStatus = "Sending FROM command..."
                    iState = 2
               
                Case 2:
                    Winsock1.SendData "RCPT TO:<" & txTo & ">" & vbCrLf
                    Debug.Print "RCPT TO:<" & txTo & ">" & vbCrLf
                    txStatus = "Sending RCPT command..."
                    iState = 3
                   
                Case 3:
                    Winsock1.SendData "DATA" & vbCrLf
                    Debug.Print "DATA" & vbCrLf
                    txStatus = "Sending DATA command..."
                    iState = 4
                   
                Case 5:
                    Winsock1.SendData "QUIT" & vbCrLf
                    Debug.Print "QUIT" & vbCrLf
                    txStatus = "Sending Quit command to disconnecting from mail server..."
                    iState = 6
                    Winsock1.Close
                End Select
               
        Case 354
            iState = 5
            szMsg = txMessage
            txStatus = "Sending mail message data..."
            Winsock1.SendData "Subject: " & txSubject & vbCrLf
            While szMsg <> ""
                Winsock1.SendData Left(szMsg, InStr(szMsg, Chr(10)))
                Debug.Print "Sending:" & Left(szMsg, InStr(szMsg, Chr(10)))
                szMsg = Mid(szMsg, InStr(szMsg, Chr(10)) + 1)
                Wend
            Winsock1.SendData "." & vbCrLf
           
        Case 500 To 599
            Winsock1.SendData "QUIT" & vbCrLf
            txStatus = "Error sending mail..."
            Debug.Print "Error sending mail... quitting..."
            iState = 999
           
        End Select
   
End Sub
483  Programación / Programación Visual Basic / Re: Impresiones en: 9 Octubre 2006, 17:45 pm
hay muchas impresoras que cuando sacas la hoja de prueba te dicen cuantas impresiones llevan, a mi me suena como que se ocupa lenguaje ensamblador para hacer eso que dices
484  Programación / Programación Visual Basic / Re: acceso a la base de datos ...???? en: 7 Octubre 2006, 23:50 pm
la verdad ya no entendi que es lo que quieres hacer, pero porque no pones el codigo que tienes y aqui lo depuramos,
485  Programación / Programación Visual Basic / Re: Ejecutar aplicación mediante teclas en: 7 Octubre 2006, 22:24 pm
para llamar un .exe debes usar la funcion Shell

dim i as long
i= shell("c:\...\aplicacion.exe")

y para lo de las teclas puedes usar los eventos keyPress, KeyDown, KeyUp de los distintos controles que estes usando
486  Programación / Programación Visual Basic / Re: en access funciona en excel no.... porke???? en: 7 Octubre 2006, 22:21 pm
ese error que te da, sale cuando en la consulta que haces a la tabla (en este caso a tu hoja de excel) haces referencia a un campo que no existe, por ejemplo que tengas un campo llamado "Code Client" y que a la hora de hacer la consulta lo escribiste "Code Clint", revisa que los nombre de los campos de tu hoja de excel sean iguales a los de la consulta <sql>
487  Programación / Programación Visual Basic / Re: Posiciones relativas a la pantalla en: 7 Octubre 2006, 22:10 pm
creo que es esta, pero nunca la he usado:

Public Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
488  Programación / Programación Visual Basic / Re: Correo desde Visual Basic???? en: 6 Octubre 2006, 23:13 pm
ya cheque el link que me recomendaron pero no hace nada, hay alguna otra forma???
489  Programación / Programación Visual Basic / Re: METER IMAGEN EN UNA VARIABLE en: 6 Octubre 2006, 04:00 am
puedes hacer esto

    Dim x As PictureBox
   
    Set x = Picture1
    Image1.Picture = x.Picture
490  Programación / Programación Visual Basic / Re: acceso a la base de datos ...???? en: 6 Octubre 2006, 03:27 am
si esto no te ayuda, pon el codigo de tu programa y vemos donde esta el error
Páginas: 1 ... 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 [49] 50 51 52 53
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines