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

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


  Mostrar Mensajes
Páginas: 1 ... 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 [23] 24 25
221  Programación / Programación Visual Basic / Re: Copiar parte de una array a otra array en: 17 Diciembre 2007, 07:06 am
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  Programación / Programación Visual Basic / Re: varias preguntas sobre VB y SQL en: 17 Diciembre 2007, 03:48 am

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


saludos
223  Programación / Programación Visual Basic / Re: Casi nada de Programación solo de Logica. :O en: 17 Diciembre 2007, 03:45 am
Hice esto.... espero que te ayude.... y que sea lo que vos queres...


Código
  1.    Dim sValor      As String
  2.    Dim sData()     As String
  3.    Dim i           As Long
  4.  
  5.    'la cadena a extraer
  6.    sValor = "'XXXXX', 'sunemail@hotmail.com', 'una.ip.normal.1', 1, 0, '', 'Hola esta es una prueba'"
  7.  
  8.    'Delimitamos la coma ,
  9.    sData = Split(sValor, ",")
  10.  
  11.    'Recorre todos los valores
  12.    For i = 0 To UBound(sData)
  13.    'los escribe en el debug (inmediato)
  14.        Debug.Print sData(i) & vbCrLf
  15.    Next
  16.  
  17.    'aca mostramos el mensaje con el mail
  18.    MsgBox Trim(Mid(sData(1), 3, Len(sData(1)) - 3))



saludos.. :D
224  Programación / Programación Visual Basic / Re: Actualizar nuestra aplicacion.. en: 11 Diciembre 2007, 17:14 pm
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  Programación / Programación Visual Basic / Re: Como crear un P2Pż? en: 11 Diciembre 2007, 17:11 pm
si tenes experiencia en protocolos, winsock, multisocalos, aplis.... lo podes hacer...

sino fuiste y no es algo sencillo de hacer eh!


saluditos!
226  Programación / Programación Visual Basic / Re: Duda con comillas y variable en: 10 Diciembre 2007, 09:31 am
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  Programación / Programación Visual Basic / Re: Funcion Friend? Como Funciona? en: 10 Diciembre 2007, 09:28 am
son funciones que solo funcionan dentro de un modulo o una clase
228  Programación / Programación Visual Basic / Re: Instruccion para recuperar el nombre del equipo en: 10 Diciembre 2007, 09:25 am
podes usar el mismo winsock para eso...

Código:
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
  1. 'example by Donavon Kuhn (Donavon.Kuhn@Nextel.com)
  2. Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
  3. Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
  4. Private Sub Form_Load()
  5.    Dim dwLen As Long
  6.    Dim strString As String
  7.    'Create a buffer
  8.    dwLen = MAX_COMPUTERNAME_LENGTH + 1
  9.    strString = String(dwLen, "X")
  10.    'Get the computer name
  11.    GetComputerName strString, dwLen
  12.    'get only the actual data
  13.    strString = Left(strString, dwLen)
  14.    'Show the computer name
  15.    MsgBox strString
  16. End Sub

directo del APIGuide

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


esto en el form:
Código
  1. 'This project requires the following components:
  2. ' - a form (Form1) with a textbox (Text1, Multiline=True)
  3. '   and a command button (Command1)
  4. ' - a module (Module1)
  5.  
  6.  
  7. Private Sub Command1_Click()
  8.    Module1.Start
  9. End Sub


Esto en un modulo:
Código
  1. '******************************************************************
  2. 'Created By Verburgh Peter.
  3. ' 07-23-2001
  4. ' verburgh.peter@skynet.be
  5. '-------------------------------------
  6. 'With this small application , you can detect the IP's installed on your computer,
  7. 'including subnet mask , BroadcastAddr..
  8. '
  9. 'I've wrote this because i've a programm that uses the winsock control, but,
  10. 'if you have multiple ip's  installed on your pc , you could get by using the Listen
  11. ' method the wrong ip ...
  12. 'Because Winsock.Localip => detects the default ip installed on your PC ,
  13. ' and in most of the cases it could be the LAN (nic) not the WAN (nic)
  14. 'So then you have to use the Bind function ,to bind to your right ip..
  15. 'but how do you know & find that ip ?
  16. 'you can find it now by this appl.. it check's in the api.. IP Table..
  17. '******************************************************************
  18.  
  19.  
  20. Const MAX_IP = 5   'To make a buffer... i dont think you have more than 5 ip on your pc..
  21.  
  22. Type IPINFO
  23.     dwAddr As Long   ' IP address
  24.    dwIndex As Long '  interface index
  25.    dwMask As Long ' subnet mask
  26.    dwBCastAddr As Long ' broadcast address
  27.    dwReasmSize  As Long ' assembly size
  28.    unused1 As Integer ' not currently used
  29.    unused2 As Integer '; not currently used
  30. End Type
  31.  
  32. Type MIB_IPADDRTABLE
  33.    dEntrys As Long   'number of entries in the table
  34.    mIPInfo(MAX_IP) As IPINFO  'array of IP address entries
  35. End Type
  36.  
  37. Type IP_Array
  38.    mBuffer As MIB_IPADDRTABLE
  39.    BufferLen As Long
  40. End Type
  41.  
  42. Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
  43. Public Declare Function GetIpAddrTable Lib "IPHlpApi" (pIPAdrTable As Byte, pdwSize As Long, ByVal Sort As Long) As Long
  44. Sub main()
  45. Form1.Show
  46. End Sub
  47.  
  48. 'converts a Long  to a string
  49. Public Function ConvertAddressToString(longAddr As Long) As String
  50.    Dim myByte(3) As Byte
  51.    Dim Cnt As Long
  52.    CopyMemory myByte(0), longAddr, 4
  53.    For Cnt = 0 To 3
  54.        ConvertAddressToString = ConvertAddressToString + CStr(myByte(Cnt)) + "."
  55.    Next Cnt
  56.    ConvertAddressToString = Left$(ConvertAddressToString, Len(ConvertAddressToString) - 1)
  57. End Function
  58.  
  59. Public Sub Start()
  60. Dim Ret As Long, Tel As Long
  61. Dim bBytes() As Byte
  62. Dim Listing As MIB_IPADDRTABLE
  63.  
  64. Form1.Text1 = ""
  65.  
  66. On Error GoTo END1
  67.    GetIpAddrTable ByVal 0&, Ret, True
  68.  
  69.    If Ret <= 0 Then Exit Sub
  70.    ReDim bBytes(0 To Ret - 1) As Byte
  71.    'retrieve the data
  72.    GetIpAddrTable bBytes(0), Ret, False
  73.  
  74.    'Get the first 4 bytes to get the entry's.. ip installed
  75.    CopyMemory Listing.dEntrys, bBytes(0), 4
  76.    'MsgBox "IP's found : " & Listing.dEntrys    => Founded ip installed on your PC..
  77.    Form1.Text1 = Listing.dEntrys & "   IP addresses found on your PC !!" & vbCrLf
  78.    Form1.Text1 = Form1.Text1 & "----------------------------------------" & vbCrLf
  79.    For Tel = 0 To Listing.dEntrys - 1
  80.        'Copy whole structure to Listing..
  81.       ' MsgBox bBytes(tel) & "."
  82.        CopyMemory Listing.mIPInfo(Tel), bBytes(4 + (Tel * Len(Listing.mIPInfo(0)))), Len(Listing.mIPInfo(Tel))
  83.         Form1.Text1 = Form1.Text1 & "IP address                   : " & ConvertAddressToString(Listing.mIPInfo(Tel).dwAddr) & vbCrLf
  84.         Form1.Text1 = Form1.Text1 & "IP Subnetmask            : " & ConvertAddressToString(Listing.mIPInfo(Tel).dwMask) & vbCrLf
  85.         Form1.Text1 = Form1.Text1 & "BroadCast IP address  : " & ConvertAddressToString(Listing.mIPInfo(Tel).dwBCastAddr) & vbCrLf
  86.         Form1.Text1 = Form1.Text1 & "**************************************" & vbCrLf
  87.    Next
  88.  
  89. 'MsgBox ConvertAddressToString(Listing.mIPInfo(1).dwAddr)
  90. Exit Sub
  91. END1:
  92. MsgBox "ERROR"
  93. End Sub


saluditos... http://foro.classicvisualbasic.com
229  Programación / Programación Visual Basic / Re: [Video-tuto] Creando una simple calculadora [By SilverMagics] en: 9 Diciembre 2007, 23:32 pm
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  Programación / Programación Visual Basic / Re: control de impresiones en: 7 Diciembre 2007, 06:44 am
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
Páginas: 1 ... 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 [23] 24 25
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines