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

 

 


Tema destacado: Como proteger una cartera - billetera de Bitcoin


  Mostrar Mensajes
Páginas: 1 2 3 4 5 6 7 8 9 [10] 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ... 50
91  Programación / Scripting / Re: Resultado falso o verdadero [AutoIt] en: 14 Octubre 2013, 20:43 pm
Tendiras que poner algo como

Código
  1. local $result=0
  2. while true
  3. $result = _ImageSearch($hBitmapA, 1, $x, $y, 20, 0) ;
  4. if $result>0 Then
  5. MouseMove($x, $y)
  6. MouseClick("left")
  7. ExitLoop
  8. endif
  9. sleep(300)
  10. WEnd


saludos
92  Programación / Programación Visual Basic / Re: Ayuda ordenar un list de manera ascendente o descendente en: 13 Octubre 2013, 22:43 pm
Ya te dije tienes que leer mas.

el error es por el nombre de los controles que alguno no coincide. ademas falta terminarlo así no va a andar.
93  Programación / Programación Visual Basic / Re: Ayuda ordenar un list de manera ascendente o descendente en: 13 Octubre 2013, 21:46 pm
Estas declarando un rutina dentro de otra :S

debería ser algo así.

Código
  1.  
  2.  
  3.  
  4. Private Sub Ordenar_Click()
  5. Dim i As Long
  6. Dim arreglo() As Long
  7. ReDim arreglo(List1.ListCount - 1)
  8. For i = 0 To List1.ListCount - 1
  9. arreglo(i) = Int(List1.List(i))
  10. Next
  11. For i = 0 To UBound(arreglo)
  12.  
  13. Next
  14. Call BubbleSort(arreglo(), True)
  15. List1.Clear
  16.  
  17. For i = 0 To UBound(arreglo)
  18. List1.AddItem arreglo(i)
  19. Next
  20.  
  21.  
  22.  
  23. End Sub
  24.  
  25.  
  26.  
  27.  
  28. 'true ascendente, false descendente
  29. Public Sub BubbleSort(ByRef iaArray() As Long, Optional ByVal tipo As Boolean = True)
  30.  
  31. Dim n As Integer, i As Integer, j As Integer
  32.  
  33.    n = UBound(iaArray)
  34.  
  35.    For i = (n - 1) To 0 Step -1
  36.  
  37.        For j = 0 To i
  38.  
  39. If tipo = True Then
  40.            If iaArray(j) > iaArray(j + 1) Then
  41.            Swap iaArray(j), iaArray(j + 1)
  42.  
  43.            End If
  44. Else
  45. If iaArray(j) < iaArray(j + 1) Then
  46.            Swap iaArray(j), iaArray(j + 1)
  47.  
  48.            End If
  49.            End If
  50.  
  51.  
  52.        Next j
  53.  
  54.    Next i
  55.  
  56. End Sub
  57.  
  58.  
  59.  
  60.  
  61.  
  62. Private Sub Swap(ByRef xArg1, ByRef xArg2)
  63.  
  64.    Dim xTmp
  65.  
  66.    xTmp = xArg2
  67.  
  68.    xArg2 = xArg1
  69.  
  70.    xArg1 = xTmp
  71.  
  72. End Sub
  73.  
  74.  
  75.  
  76.  
  77.  


PD: te recomiendo que leas mas sobre vb6( al menos lo básico ¬¬) lo estas haciendo al azar.

saludos
94  Programación / Programación Visual Basic / Re: Ayuda ordenar un list de manera ascendente o descendente en: 13 Octubre 2013, 21:20 pm
Muestra tu código completo  :rolleyes:
95  Programación / Programación Visual Basic / Re: Ayuda ordenar un list de manera ascendente o descendente en: 13 Octubre 2013, 21:05 pm
A ver.

Te la pongo facil.

usa este algoritmo

Código
  1. 'true ascendente, false descendente
  2. Public Sub BubbleSort(ByRef iaArray() As Long, Optional ByVal tipo As Boolean = True)
  3.  
  4. Dim n As Integer, i As Integer, j As Integer
  5.  
  6.    n = UBound(iaArray)
  7.  
  8.    For i = (n - 1) To 0 Step -1
  9.  
  10.        For j = 0 To i
  11.  
  12. If tipo = True Then
  13.            If iaArray(j) > iaArray(j + 1) Then
  14.            Swap iaArray(j), iaArray(j + 1)
  15.  
  16.            End If
  17. Else
  18. If iaArray(j) < iaArray(j + 1) Then
  19.            Swap iaArray(j), iaArray(j + 1)
  20.  
  21.            End If
  22.            End If
  23.  
  24.  
  25.        Next j
  26.  
  27.    Next i
  28.  
  29. End Sub


que tienes que hacer. lo siguiente.



coger todos los elementos del listbox en un array.


luego

limpiar el listbox

luego llamar la rutina

Call BubbleSort(arreglo(), True)

luego llenar el listbox otra vez.


saludos



96  Programación / Programación Visual Basic / Re: Ayuda ordenar un list de manera ascendente o descendente en: 13 Octubre 2013, 20:38 pm
El insertionSort esta hecho en vb.net.

pero que has hecho que no te funciona?
97  Programación / Programación Visual Basic / Re: [Ayuda]Enviar mail con Dll vbSendMail en: 13 Octubre 2013, 20:33 pm
Supongo que deberías loguearte.

Este lo use hace tiempo y va bien.

Código
  1. Public Function SendMail(sTo As String, sSubject As String, sFrom As String, _
  2.    sBody As String, sSmtpServer As String, iSmtpPort As Integer, _
  3.    sSmtpUser As String, sSmtpPword As String, _
  4.    sFilePath As String, bSmtpSSL As Boolean) As String
  5.  
  6.    On Error GoTo SendMail_Error:
  7.    Dim lobj_cdomsg      As CDO.Message
  8.    Set lobj_cdomsg = New CDO.Message
  9.    lobj_cdomsg.Configuration.Fields(cdoSMTPServer) = sSmtpServer
  10.    lobj_cdomsg.Configuration.Fields(cdoSMTPServerPort) = iSmtpPort
  11.    lobj_cdomsg.Configuration.Fields(cdoSMTPUseSSL) = bSmtpSSL
  12.    lobj_cdomsg.Configuration.Fields(cdoSMTPAuthenticate) = cdoBasic
  13.    lobj_cdomsg.Configuration.Fields(cdoSendUserName) = sSmtpUser
  14.    lobj_cdomsg.Configuration.Fields(cdoSendPassword) = sSmtpPword
  15.    lobj_cdomsg.Configuration.Fields(cdoSMTPConnectionTimeout) = 30
  16.    lobj_cdomsg.Configuration.Fields(cdoSendUsingMethod) = cdoSendUsingPort
  17.    lobj_cdomsg.Configuration.Fields.Update
  18.    lobj_cdomsg.To = sTo
  19.    lobj_cdomsg.From = sFrom
  20.    lobj_cdomsg.Subject = sSubject
  21.    lobj_cdomsg.TextBody = sBody
  22.    If Trim$(sFilePath) <> vbNullString Then
  23.        lobj_cdomsg.AddAttachment (sFilePath)
  24.    End If
  25.    lobj_cdomsg.Send
  26.    Set lobj_cdomsg = Nothing
  27.    SendMail = "ok"
  28.    Exit Function
  29.  
  30. SendMail_Error:
  31.    SendMail = Err.Description
  32. End Function


saludos
98  Programación / Programación Visual Basic / Re: Ayuda ordenar un list de manera ascendente o descendente en: 13 Octubre 2013, 20:31 pm
Que no te funciona?
99  Programación / Programación Visual Basic / Re: Ayuda ordenar un list de manera ascendente o descendente en: 13 Octubre 2013, 19:55 pm
la documentación es larga pero el algoritmo te quedara en menos de 15 lineas.

culaquier duda pregunta.

saludos
100  Programación / Programación Visual Basic / Re: Ayuda ordenar un list de manera ascendente o descendente en: 13 Octubre 2013, 19:38 pm
ahí tienes.


http://es.wikipedia.org/wiki/Ordenamiento_de_burbuja


saludos
Páginas: 1 2 3 4 5 6 7 8 9 [10] 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ... 50
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines