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 - SKL (orignal)

#221
la verdad que no entiendo bien lo qeu queres hacer... buffer y byteTotal son 2 cosas distintas...

si podrias poner un ejemplo de lo que queres hacer me seria mucho mas facil ayudarte...

osea, mostrandome una cadena de informacion origianl y una de como queres que este modificada

saludos
#222

en www.recursosvisualbasic.com.ar tenes varios ejemplos... y ahi seguro te van a ayudar...


saludos
#223
Hice esto.... espero que te ayude.... y que sea lo que vos queres...


Código (vb) [Seleccionar]
    Dim sValor      As String
    Dim sData()     As String
    Dim i           As Long
   
    'la cadena a extraer
    sValor = "'XXXXX', 'sunemail@hotmail.com', 'una.ip.normal.1', 1, 0, '', 'Hola esta es una prueba'"

    'Delimitamos la coma ,
    sData = Split(sValor, ",")
   
    'Recorre todos los valores
    For i = 0 To UBound(sData)
    'los escribe en el debug (inmediato)
        Debug.Print sData(i) & vbCrLf
    Next

    'aca mostramos el mensaje con el mail
    MsgBox Trim(Mid(sData(1), 3, Len(sData(1)) - 3))




saludos.. :D
#224
no es difciil, solo hay que hacerlo...

tenes que subir a un ftp o pagina... y verificar con vb que la version que esta en el ftp sea diferente y mayor a la que tenes en uso en este momento... si se cumple todo... se descarga todo en la misma carpeta y se "instala" o se ejecuta... pero te recomiendo que crees un exe aparte para la actualizacion, asi podes reemplazar el mismo archivo sin que te moleste porque lo estas usando etc....


sl2
#225
si tenes experiencia en protocolos, winsock, multisocalos, aplis.... lo podes hacer...

sino fuiste y no es algo sencillo de hacer eh!


saluditos!
#226
Cita de: demoniox12 en  7 Diciembre 2007, 18:31 PM
como puedo hacer para poner en una variable una comilla??

ejemplo:

variable = "Hola "estas?" "

intente como en php poniendole \ antes de la " pero tampoco..

ej: varibale = "Hola \"estas?\" "

salu2!

eh????

varibale = "Hola estas?"

o

variable = "hola" & """estas?"""


saluditos
#227
son funciones que solo funcionan dentro de un modulo o una clase
#228
podes usar el mismo winsock para eso...

msgbox WS.LocalHost
msgbox WS.LocalIP


y listo... ahi te dice la ip y el nombre del host

pero por las dudas te dejo el api para saber el nombre de la pc

Código (vb) [Seleccionar]
'example by Donavon Kuhn (Donavon.Kuhn@Nextel.com)
Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Sub Form_Load()
    Dim dwLen As Long
    Dim strString As String
    'Create a buffer
    dwLen = MAX_COMPUTERNAME_LENGTH + 1
    strString = String(dwLen, "X")
    'Get the computer name
    GetComputerName strString, dwLen
    'get only the actual data
    strString = Left(strString, dwLen)
    'Show the computer name
    MsgBox strString
End Sub


directo del APIGuide

y para la ip... tambien del apiguide...


esto en el form:
Código (vb) [Seleccionar]
'This project requires the following components:
' - a form (Form1) with a textbox (Text1, Multiline=True)
'   and a command button (Command1)
' - a module (Module1)


Private Sub Command1_Click()
    Module1.Start
End Sub



Esto en un modulo:
Código (vb) [Seleccionar]
'******************************************************************
'Created By Verburgh Peter.
' 07-23-2001
' verburgh.peter@skynet.be
'-------------------------------------
'With this small application , you can detect the IP's installed on your computer,
'including subnet mask , BroadcastAddr..
'
'I've wrote this because i've a programm that uses the winsock control, but,
'if you have multiple ip's  installed on your pc , you could get by using the Listen
' method the wrong ip ...
'Because Winsock.Localip => detects the default ip installed on your PC ,
' and in most of the cases it could be the LAN (nic) not the WAN (nic)
'So then you have to use the Bind function ,to bind to your right ip..
'but how do you know & find that ip ?
'you can find it now by this appl.. it check's in the api.. IP Table..
'******************************************************************


Const MAX_IP = 5   'To make a buffer... i dont think you have more than 5 ip on your pc..

Type IPINFO
     dwAddr As Long   ' IP address
    dwIndex As Long '  interface index
    dwMask As Long ' subnet mask
    dwBCastAddr As Long ' broadcast address
    dwReasmSize  As Long ' assembly size
    unused1 As Integer ' not currently used
    unused2 As Integer '; not currently used
End Type

Type MIB_IPADDRTABLE
    dEntrys As Long   'number of entries in the table
    mIPInfo(MAX_IP) As IPINFO  'array of IP address entries
End Type

Type IP_Array
    mBuffer As MIB_IPADDRTABLE
    BufferLen As Long
End Type

Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Public Declare Function GetIpAddrTable Lib "IPHlpApi" (pIPAdrTable As Byte, pdwSize As Long, ByVal Sort As Long) As Long
Sub main()
Form1.Show
End Sub

'converts a Long  to a string
Public Function ConvertAddressToString(longAddr As Long) As String
    Dim myByte(3) As Byte
    Dim Cnt As Long
    CopyMemory myByte(0), longAddr, 4
    For Cnt = 0 To 3
        ConvertAddressToString = ConvertAddressToString + CStr(myByte(Cnt)) + "."
    Next Cnt
    ConvertAddressToString = Left$(ConvertAddressToString, Len(ConvertAddressToString) - 1)
End Function

Public Sub Start()
Dim Ret As Long, Tel As Long
Dim bBytes() As Byte
Dim Listing As MIB_IPADDRTABLE

Form1.Text1 = ""

On Error GoTo END1
    GetIpAddrTable ByVal 0&, Ret, True

    If Ret <= 0 Then Exit Sub
    ReDim bBytes(0 To Ret - 1) As Byte
    'retrieve the data
    GetIpAddrTable bBytes(0), Ret, False
     
    'Get the first 4 bytes to get the entry's.. ip installed
    CopyMemory Listing.dEntrys, bBytes(0), 4
    'MsgBox "IP's found : " & Listing.dEntrys    => Founded ip installed on your PC..
    Form1.Text1 = Listing.dEntrys & "   IP addresses found on your PC !!" & vbCrLf
    Form1.Text1 = Form1.Text1 & "----------------------------------------" & vbCrLf
    For Tel = 0 To Listing.dEntrys - 1
        'Copy whole structure to Listing..
       ' MsgBox bBytes(tel) & "."
        CopyMemory Listing.mIPInfo(Tel), bBytes(4 + (Tel * Len(Listing.mIPInfo(0)))), Len(Listing.mIPInfo(Tel))
         Form1.Text1 = Form1.Text1 & "IP address                   : " & ConvertAddressToString(Listing.mIPInfo(Tel).dwAddr) & vbCrLf
         Form1.Text1 = Form1.Text1 & "IP Subnetmask            : " & ConvertAddressToString(Listing.mIPInfo(Tel).dwMask) & vbCrLf
         Form1.Text1 = Form1.Text1 & "BroadCast IP address  : " & ConvertAddressToString(Listing.mIPInfo(Tel).dwBCastAddr) & vbCrLf
         Form1.Text1 = Form1.Text1 & "**************************************" & vbCrLf
    Next

'MsgBox ConvertAddressToString(Listing.mIPInfo(1).dwAddr)
Exit Sub
END1:
MsgBox "ERROR"
End Sub



saluditos... http://foro.classicvisualbasic.com
#229
Visual Basic 6 = 50 Dolares
PC Completa = 1000 Dolares
Modem ethernet = 23 Dolares

Ver este video y ese programador, "no tiene precio"...

Hay cosas qeu el dinero no puede comprar, para todo lo demas existe elHacker.net


jaja dios miooooooooooo


diganele que aprenda a poner parentecis :D
#230
fijate que aca te lista todos los trabajos que mandas a imprimir... seguro te sirve...

http://www.recursosvisualbasic.com.ar/htm/listado-api/220-ver-trabajos-pendientes-para-imprimir.htm

saludos