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

 

 


Tema destacado: AIO elhacker.NET 2021 Compilación herramientas análisis y desinfección malware


  Mostrar Mensajes
Páginas: 1 2 3 [4]
31  Programación / Programación Visual Basic / Re: Listbox en: 2 Agosto 2007, 21:18 pm
La que pasa es que mando una infinidad de datos a ese listbox y cree que sobrepaso el limite pero aun asi sigue almacenando las datos
32  Programación / Programación Visual Basic / Re: VB6 y Base de Datos en: 2 Agosto 2007, 21:16 pm
Aqui un ejemplo de creacion de credenciales escolares
form1
Código
  1. Private Sub Command1_Click()
  2. If Data1.Recordset.EOF And Data1.Recordset.BOF Then
  3.  Else
  4.    Data1.Recordset.MoveFirst
  5.      While Not Data1.Recordset.EOF
  6.         If Text1(0) = Text2(0) Then
  7.           MsgBox "El registro a cido guardado"
  8.           Exit Sub
  9.         Else
  10.           Data1.Recordset.MoveNext
  11.         End If
  12.       Wend
  13. End If
  14.  
  15. Data1.Recordset.AddNew
  16.   For i = 0 To 7
  17.     Text2(i) = Text1(i)
  18.   Next i
  19. Data1.Recordset.Update
  20. Data1.Recordset.MoveFirst
  21. MsgBox "El registro a sido añadido"
  22. End Sub
  23.  
  24. Private Sub Command2_Click()
  25. Form3.Show
  26. End Sub
  27.  
  28. Private Sub Command3_Click()
  29. For i = 0 To 7
  30. Text1(i) = ""
  31. Next i
  32. End Sub
  33.  
  34. Private Sub Command4_Click()
  35. Form2.Show
  36. End Sub
  37.  

Form 2

Código
  1. Private Sub Command1_Click()
  2. Data1.Recordset.MoveFirst
  3.   While Not Data1.Recordset.EOF
  4.       If Text1 = Text2(3) Then
  5.          For i = 0 To 7
  6.             Form1.Text1(i) = Text2(i)
  7.          Next i
  8.          MsgBox "La busqueda a finalizado"
  9.          Me.Hide
  10.       End If
  11.          Data1.Recordset.MoveNext
  12.   Wend
  13. End Sub
  14.  

form 3

Código
  1. Private Sub Form_Load()
  2. For i = 0 To 6
  3.    T1(i) = Form1.Text1(i)
  4. Next i
  5. x = Form1.Text1(7) & ".jpg"
  6. Image2 = LoadPicture("C:\Imagenes\" & x)
  7. res = MsgBox("¿Realmente quiere imprimir la credencial?", vbYesNo, "Imprimir")
  8.   If res = vbYes Then
  9.      MsgBox "La credencial de " & vbCrLf & Form1.Text1(0) & vbCrLf & "a sido impresa", vbInformation, "Imprimiendo"
  10.   Else
  11.      MsgBox "Impresion cancelada", vbInformation, "Cancelando impresion"
  12.      Me.Hide
  13.   End If
  14.  
  15. End Sub
  16.  

Ya solo conoecta los textbox ect

*Necesitas la carpeta "C:\Imagenes" para que funciones
33  Programación / Programación Visual Basic / Re: Como enviar un archivo a la papelera de reciclaje en: 2 Agosto 2007, 21:02 pm
Es necesario a la papelera de reciclaje por que lo puedes eliminar definitivamente con
Código
  1. Kill "C:\Prueba.txt"
  2.  
Pero esto te elimina el archivo de forma definitiva
34  Programación / Programación Visual Basic / Algo dificil de explicar en: 2 Agosto 2007, 20:46 pm
Mi duda es la siguiente ¿como mando datos de un exe a otro exe?, es decir al yo dar clic en un boton del exe1 y que me genere, no se un numero aleatorio o lo que sea pero que me mande el resultado del proceso a un cuadro de texto del exe2.
Espero y me explique bien
35  Programación / Programación Visual Basic / Listbox en: 2 Agosto 2007, 20:10 pm
Esto talves sonara tonto pero.......
Alguien sabe como pasar al final de un listbox
Gracias de antemano
36  Programación / Programación Visual Basic / Re: Ayuda en fuerza bruta en: 2 Agosto 2007, 02:24 am
Yo soy nuevo en programacion asi que todo es bienvenido
Me podris decir cuales son las etiquetas code
37  Programación / Programación Visual Basic / Ayuda en fuerza bruta en: 2 Agosto 2007, 02:01 am
De entrada gracias por leer esto. Mi pregunta es la siguiente.
Hice un programa que genera todas las combinaciones posibles con "2" "3" "4" "5" "6"  y "7" caracteres el problema es que tarda demasiado alguien sabe como acelerar el proceso. este es el codigo.
Necesita 11 LABEL
Un listbox
Un timer con intervalo de 100 (inicia enabled "false")
Y tres botones
Código
  1. Public mil As Integer
  2. Public seg As Integer
  3. Public min As Integer
  4. Public hor As Integer
  5. Public cont As Long
  6. Public detener As Boolean
  7. Private Sub Command1_Click()
  8. 'Programa que genera todas las combinaciones posibles con "2","3","4","5","6", y "7"
  9. 'caracteres el metodo es un poco tardado pero solo asi he logrado generarlo
  10. 'Si deseas que se formen combinaciones con mas de "7" caracteres solo sigue la misma
  11. 'estructura
  12. 'Creado por Sergio Uziel Tovar Lemus
  13. Timer1.Enabled = True
  14. Label5.Caption = "Procesando"
  15. Command2.Enabled = False
  16. Command3.Enabled = True
  17. detener = False
  18. cont = 0
  19. 'Comienza a generar combinaciones con dos caracteres
  20. For chr_uno = Asc("a") To Asc("z")
  21.    For chr_dos = Asc("a") To Asc("z")
  22.    List1.AddItem Chr(chr_uno) & Chr(chr_dos) & Chr(chr_tres) & Chr(chr_cuatro) & Chr(chr_cinco) & Chr(chr_seis) & Chr(chr_siete)
  23.    cont = cont + 1
  24.    Label2.Caption = cont
  25.       If detener = True Then
  26.          Command2.Enabled = True
  27.          Command3.Enabled = False
  28.          MsgBox "El proceso ha sido detenido por el usuario." & vbCrLf & vbCrLf & "Resultados obtenidos." & vbCrLf & vbCrLf & "Numeros de combinaciones: " & cont & vbCrLf & vbCrLf & "Tiempo transcurrido" & vbCrLf & Label6.Caption & vbCrLf & Label7.Caption & vbCrLf & Label8.Caption & vbCrLf & Label9.Caption & vbCrLf & vbCrLf & "Porcentaje del proceso: " & ProgressBar1.Value & "% de un 100% posible", vbInformation, "Informacion para el usuario"
  29.          mil = 0
  30.          seg = 0
  31.          min = 0
  32.          hor = 0
  33.          Label6.Caption = "Horas:        " & hor
  34.          Label7.Caption = "Minutos:      " & min
  35.          Label8.Caption = "Segundos:  " & seg
  36.          Label9.Caption = "Milesimas:   " & mil
  37.          List1.Clear
  38.          Label2.Caption = List1.ListCount
  39.          Label5.Caption = "Detenido por el usuario"
  40.          ProgressBar1.Value = 0
  41.          Exit Sub
  42.       End If
  43.    DoEvents
  44.    Next chr_dos
  45. DoEvents
  46. Next chr_uno
  47. ProgressBar1.Value = ProgressBar1.Value + 18.3
  48. 'Ahora hace las combinaciones con tres caracteres
  49. For chr_uno = Asc("a") To Asc("z")
  50.    For chr_dos = Asc("a") To Asc("z")
  51.         For chr_tres = Asc("a") To Asc("z")
  52.         List1.AddItem Chr(chr_uno) & Chr(chr_dos) & Chr(chr_tres) & Chr(chr_cuatro) & Chr(chr_cinco) & Chr(chr_seis) & Chr(chr_siete)
  53.         cont = cont + 1
  54.         Label2.Caption = cont
  55.            If detener = True Then
  56.               Command2.Enabled = True
  57.               Command3.Enabled = False
  58.               MsgBox "El proceso ha sido detenido por el usuario." & vbCrLf & vbCrLf & "Resultados obtenidos." & vbCrLf & vbCrLf & "Numeros de combinaciones: " & cont & vbCrLf & vbCrLf & "Tiempo transcurrido" & vbCrLf & Label6.Caption & vbCrLf & Label7.Caption & vbCrLf & Label8.Caption & vbCrLf & Label9.Caption & vbCrLf & vbCrLf & "Porcentaje del proceso: " & ProgressBar1.Value & "% de un 100% posible", vbInformation, "Informacion para el usuario"
  59.               mil = 0
  60.               seg = 0
  61.               min = 0
  62.               hor = 0
  63.               Label6.Caption = "Horas:        " & hor
  64.               Label7.Caption = "Minutos:      " & min
  65.               Label8.Caption = "Segundos:  " & seg
  66.               Label9.Caption = "Milesimas:   " & mil
  67.               List1.Clear
  68.               Label2.Caption = List1.ListCount
  69.               Label5.Caption = "Detenido por el usuario"
  70.               ProgressBar1.Value = 0
  71.               Exit Sub
  72.            End If
  73.         DoEvents
  74.         Next chr_tres
  75.    DoEvents
  76.    Next chr_dos
  77. DoEvents
  78. Next chr_uno
  79. ProgressBar1.Value = ProgressBar1.Value + 18.3
  80. 'Ahora hace las combinaciones con cuatro caracteres
  81. For chr_uno = Asc("a") To Asc("z")
  82.    For chr_dos = Asc("a") To Asc("z")
  83.         For chr_tres = Asc("a") To Asc("z")
  84.             For chr_cuatro = Asc("a") To Asc("z")
  85.             List1.AddItem Chr(chr_uno) & Chr(chr_dos) & Chr(chr_tres) & Chr(chr_cuatro) & Chr(chr_cinco) & Chr(chr_seis) & Chr(chr_siete)
  86.             cont = cont + 1
  87.             Label2.Caption = cont
  88.                If detener = True Then
  89.                   Command2.Enabled = True
  90.                   Command3.Enabled = False
  91.                   MsgBox "El proceso ha sido detenido por el usuario." & vbCrLf & vbCrLf & "Resultados obtenidos." & vbCrLf & vbCrLf & "Numeros de combinaciones: " & cont & vbCrLf & vbCrLf & "Tiempo transcurrido" & vbCrLf & Label6.Caption & vbCrLf & Label7.Caption & vbCrLf & Label8.Caption & vbCrLf & Label9.Caption & vbCrLf & vbCrLf & "Porcentaje del proceso: " & ProgressBar1.Value & "% de un 100% posible", vbInformation, "Informacion para el usuario"
  92.                   mil = 0
  93.                   seg = 0
  94.                   min = 0
  95.                   hor = 0
  96.                   Label6.Caption = "Horas:        " & hor
  97.                   Label7.Caption = "Minutos:      " & min
  98.                   Label8.Caption = "Segundos:  " & seg
  99.                   Label9.Caption = "Milesimas:   " & mil
  100.                   List1.Clear
  101.                   Label2.Caption = List1.ListCount
  102.                   Label5.Caption = "Detenido por el usuario"
  103.                   ProgressBar1.Value = 0
  104.                   Exit Sub
  105.                End If
  106.             DoEvents
  107.             Next chr_cuatro
  108.         DoEvents
  109.         Next chr_tres
  110.    Next chr_dos
  111. DoEvents
  112. Next chr_uno
  113. ProgressBar1.Value = ProgressBar1.Value + 18.3
  114. 'Ahora comenzamos con cinco caracteres
  115. For chr_uno = Asc("a") To Asc("z")
  116.    For chr_dos = Asc("a") To Asc("z")
  117.         For chr_tres = Asc("a") To Asc("z")
  118.             For chr_cuatro = Asc("a") To Asc("z")
  119.                 For chr_cinco = Asc("a") To Asc("z")
  120.                 List1.AddItem Chr(chr_uno) & Chr(chr_dos) & Chr(chr_tres) & Chr(chr_cuatro) & Chr(chr_cinco) & Chr(chr_seis) & Chr(chr_siete)
  121.                 cont = cont + 1
  122.                 Label2.Caption = cont
  123.                    If detener = True Then
  124.                       Command2.Enabled = True
  125.                       Command3.Enabled = False
  126.                       MsgBox "El proceso ha sido detenido por el usuario." & vbCrLf & vbCrLf & "Resultados obtenidos." & vbCrLf & vbCrLf & "Numeros de combinaciones: " & cont & vbCrLf & vbCrLf & "Tiempo transcurrido" & vbCrLf & Label6.Caption & vbCrLf & Label7.Caption & vbCrLf & Label8.Caption & vbCrLf & Label9.Caption & vbCrLf & vbCrLf & "Porcentaje del proceso: " & ProgressBar1.Value & "% de un 100% posible", vbInformation, "Informacion para el usuario"
  127.                       mil = 0
  128.                       seg = 0
  129.                       min = 0
  130.                       hor = 0
  131.                       Label6.Caption = "Horas:        " & hor
  132.                       Label7.Caption = "Minutos:      " & min
  133.                       Label8.Caption = "Segundos:  " & seg
  134.                       Label9.Caption = "Milesimas:   " & mil
  135.                       List1.Clear
  136.                       Label2.Caption = List1.ListCount
  137.                       Label5.Caption = "Detenido por el usuario"
  138.                       ProgressBar1.Value = 0
  139.                       Exit Sub
  140.                    End If
  141.                 DoEvents
  142.                 Next chr_cinco
  143.             DoEvents
  144.             Next chr_cuatro
  145.         DoEvents
  146.         Next chr_tres
  147.    Next chr_dos
  148. DoEvents
  149. Next chr_uno
  150. ProgressBar1.Value = ProgressBar1.Value + 18.3
  151. 'Con seis caracteres
  152. For chr_uno = Asc("a") To Asc("z")
  153.    For chr_dos = Asc("a") To Asc("z")
  154.         For chr_tres = Asc("a") To Asc("z")
  155.             For chr_cuatro = Asc("a") To Asc("z")
  156.                 For chr_cinco = Asc("a") To Asc("z")
  157.                     For chr_seis = Asc("a") To Asc("z")
  158.                     List1.AddItem Chr(chr_uno) & Chr(chr_dos) & Chr(chr_tres) & Chr(chr_cuatro) & Chr(chr_cinco) & Chr(chr_seis) & Chr(chr_siete)
  159.                     cont = cont + 1
  160.                     Label2.Caption = cont
  161.                         If detener = True Then
  162.                            Command2.Enabled = True
  163.                            Command3.Enabled = False
  164.                            MsgBox "El proceso ha sido detenido por el usuario." & vbCrLf & vbCrLf & "Resultados obtenidos." & vbCrLf & vbCrLf & "Numeros de combinaciones: " & cont & vbCrLf & vbCrLf & "Tiempo transcurrido" & vbCrLf & Label6.Caption & vbCrLf & Label7.Caption & vbCrLf & Label8.Caption & vbCrLf & Label9.Caption & vbCrLf & vbCrLf & "Porcentaje del proceso: " & ProgressBar1.Value & "% de un 100% posible", vbInformation, "Informacion para el usuario"
  165.                            mil = 0
  166.                            seg = 0
  167.                            min = 0
  168.                            hor = 0
  169.                            Label6.Caption = "Horas:        " & hor
  170.                            Label7.Caption = "Minutos:      " & min
  171.                            Label8.Caption = "Segundos:  " & seg
  172.                            Label9.Caption = "Milesimas:   " & mil
  173.                            List1.Clear
  174.                            Label2.Caption = List1.ListCount
  175.                            Label5.Caption = "Detenido por el usuario"
  176.                            ProgressBar1.Value = 0
  177.                            Exit Sub
  178.                         End If
  179.                     DoEvents
  180.                     Next chr_seis
  181.                 DoEvents
  182.                 Next chr_cinco
  183.             DoEvents
  184.             Next chr_cuatro
  185.         DoEvents
  186.         Next chr_tres
  187.    Next chr_dos
  188. DoEvents
  189. Next chr_uno
  190. ProgressBar1.Value = ProgressBar1.Value + 18.3
  191. 'Finalmente con siete
  192. For chr_uno = Asc("a") To Asc("z")
  193.    For chr_dos = Asc("a") To Asc("z")
  194.         For chr_tres = Asc("a") To Asc("z")
  195.             For chr_cuatro = Asc("a") To Asc("z")
  196.                 For chr_cinco = Asc("a") To Asc("z")
  197.                     For chr_seis = Asc("a") To Asc("z")
  198.                         For chr_siete = Asc("a") To Asc("z")
  199.                         List1.AddItem Chr(chr_uno) & Chr(chr_dos) & Chr(chr_tres) & Chr(chr_cuatro) & Chr(chr_cinco) & Chr(chr_seis) & Chr(chr_siete)
  200.                         cont = cont + 1
  201.                         Label2.Caption = cont
  202.                            If detener = True Then
  203.                               Command2.Enabled = True
  204.                               Command3.Enabled = False
  205.                               MsgBox "El proceso ha sido detenido por el usuario." & vbCrLf & vbCrLf & "Resultados obtenidos." & vbCrLf & vbCrLf & "Numeros de combinaciones: " & cont & vbCrLf & vbCrLf & "Tiempo transcurrido" & vbCrLf & Label6.Caption & vbCrLf & Label7.Caption & vbCrLf & Label8.Caption & vbCrLf & Label9.Caption & vbCrLf & vbCrLf & "Porcentaje del proceso: " & ProgressBar1.Value & "% de un 100% posible", vbInformation, "Informacion para el usuario"
  206.                               mil = 0
  207.                               seg = 0
  208.                               min = 0
  209.                               hor = 0
  210.                               Label6.Caption = "Horas:        " & hor
  211.                               Label7.Caption = "Minutos:      " & min
  212.                               Label8.Caption = "Segundos:  " & seg
  213.                               Label9.Caption = "Milesimas:   " & mil
  214.                               List1.Clear
  215.                               Label2.Caption = List1.ListCount
  216.                               Label5.Caption = "Detenido por el usuario"
  217.                               ProgressBar1.Value = 0
  218.                               Exit Sub
  219.                            End If
  220.                         DoEvents
  221.                         Next chr_siete
  222.                     DoEvents
  223.                     Next chr_seis
  224.                 DoEvents
  225.                 Next chr_cinco
  226.             DoEvents
  227.             Next chr_cuatro
  228.         DoEvents
  229.         Next chr_tres
  230.    Next chr_dos
  231. DoEvents
  232. Next chr_uno
  233. Command2.Enabled = True
  234. ProgressBar1.Value = ProgressBar1.Value + 18.3
  235. Label5.Caption = "Terminado"
  236. Timer1.Enabled = False
  237. mil = 0
  238. seg = 0
  239. min = 0
  240. hor = 0
  241. Label6.Caption = "Horas:        " & hor
  242. Label7.Caption = "Minutos:      " & min
  243. Label8.Caption = "Segundos:  " & seg
  244. Label9.Caption = "Milesimas:   " & mil
  245. MsgBox "El proceso ha terminado satisfactoriamente." & vbCrLf & vbCrLf & "Resultados obtenidos." & vbCrLf & vbCrLf & "Numeros de combinaciones: " & cont & vbCrLf & vbCrLf & "Tiempo transcurrido" & vbCrLf & Label6.Caption & vbCrLf & Label7.Caption & vbCrLf & Label8.Caption & vbCrLf & Label9.Caption & vbCrLf & vbCrLf & "Porcentaje del proceso: " & ProgressBar1.Value & "% de un 100% posible", vbInformation, "Informacion para el usuario"
  246. mil = 0
  247. seg = 0
  248. min = 0
  249. hor = 0
  250. Label6.Caption = "Horas:        " & hor
  251. Label7.Caption = "Minutos:      " & min
  252. Label8.Caption = "Segundos:  " & seg
  253. Label9.Caption = "Milesimas:   " & mil
  254. List1.Clear
  255. Label2.Caption = List1.ListCount
  256. Label5.Caption = "Detenido por el usuario"
  257. ProgressBar1.Value = 0
  258. End Sub
  259.  
  260. Private Sub Command2_Click()
  261. Label5.Caption = "Limpiando"
  262. List1.Clear
  263. Label2.Caption = List1.ListCount
  264. Label5.Caption = "Detenido"
  265. End Sub
  266.  
  267. Private Sub Command3_Click()
  268. detener = True
  269. Timer1.Enabled = False
  270. End Sub
  271.  
  272. Private Sub Command8_Click()
  273.  
  274. End Sub
  275.  
  276. Private Sub Command9_Click()
  277.  
  278. End Sub
  279.  
  280. Private Sub Form_Load()
  281. Label1.Caption = "combinaciones generadas: "
  282. Label2.Caption = List1.ListCount
  283. Label6.Caption = "Horas:        " & hor
  284. Label7.Caption = "Minutos:      " & min
  285. Label8.Caption = "Segundos:  " & seg
  286. Label9.Caption = "Milesimas:   " & mil
  287. End Sub
  288.  
  289. Private Sub Timer1_Timer()
  290. mil = mil + 1
  291. Label6.Caption = "Horas:        " & hor
  292. Label7.Caption = "Minutos:      " & min
  293. Label8.Caption = "Segundos:  " & seg
  294. Label9.Caption = "Milesimas:   " & mil
  295. If mil = 10 Then
  296. mil = 0
  297. seg = seg + 1
  298.  If seg = 60 Then
  299.   seg = 0
  300.   min = min + 1
  301.       If min = 60 Then
  302.       min = 0
  303.       hor = hor + 1
  304.       End If
  305.   End If
  306. End If
  307. End Sub
Páginas: 1 2 3 [4]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines