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
31  Programación / Programación Visual Basic / Re: algun soft que me sirva control de ventas de cartucho en: 9 Julio 2009, 02:29 am
antes de empezar la interfaz con vb tienes que crear la base de datos que en realidad seria lo mas importante
32  Programación / Programación Visual Basic / Re: algun soft que me sirva control de ventas de cartucho en: 9 Julio 2009, 00:13 am
debes mandar a hacer el soft a la medida, creo que comercialmente no hay un software para ello , y trabajos de base de datos para esto tampoco creo.
33  Programación / Programación Visual Basic / Re: Resolver ecuaciones Visual Basic 6.0 en: 8 Julio 2009, 04:51 am
no esta en vb 6 pero podria servite este source en vb.Net http://www.a1vbcode.com/app-3174.asp
34  Programación / Programación Visual Basic / Re: Crear un informe sin necesidad de base de datos?? en: 2 Julio 2009, 04:50 am
pues eso funciona siempre y cuando pases el recorset porque sino te va a mostrar error con el origen de datos
35  Programación / Programación Visual Basic / Re: Crear un informe sin necesidad de base de datos?? en: 2 Julio 2009, 03:02 am
no es necesario

mira tienes que hacer esto:

Código
  1. Set MyControlEnDatareport = datareport1.Sections(aquivaelnumerodelasecciondondeestaelcontrol).Controls(nombre del control)
  2. MyControlEnDatareport.text="loquequierasmostrar" ' puedes asignarle lo que quieras a la propiedad texto del rptlabel
  3.  
36  Programación / Programación Visual Basic / Re: ID en base de datos en: 21 Junio 2009, 16:17 pm
agregale la clausula WHERE especificando que vamos a filtrar por Nombre


Código:
With RecorsetNuevoRegistro
        .Open "Select campo From tabla WHERE Nombre='TheGhost(Z)' ORDER BY ID", ActiveConnection:="mi cadena conexion", _
        CursorType:=adOpenKeyset, LockType:=adLockOptimistic
        .MoveLast
        valornuevaid = !ID + 1
        .Close
 End With
37  Programación / Programación Visual Basic / Re: ID en base de datos en: 21 Junio 2009, 03:29 am
de esta forma adiciono un nuevo registro cuando el valor de este es autonumerico, hago la consulta primero y al valor obtenido del campo ID le agrego 1:

Código
  1. With RecorsetNuevoRegistro
  2.        .Open "Select campo From tabla ORDER BY ID", ActiveConnection:="mi cadena conexion", _
  3.        CursorType:=adOpenKeyset, LockType:=adLockOptimistic
  4.        .MoveLast
  5.        valornuevaid = !ID + 1
  6.        .Close
  7. End With

con respecto a lo de la relación que deben tener las tablas eso ya te lo explico muy bien cΔssiΔnі y es independiente de vb.

saludos  ;D
38  Programación / Programación Visual Basic / Re: problema para mostrar 'cargando...' en: 21 Junio 2009, 03:02 am
he aquí estos módulos de clase que te ayudaran con tu problema

Código
  1. 'clsThreading:
  2. 'Simple class that allows you to implement multithreading in your app
  3. '
  4. '(C) 2001 by Philipp Weidmann
  5.  
  6. 'API Declarations
  7. 'Creates a new thread
  8. Private Declare Function CreateThread Lib "kernel32" (ByVal lpThreadAttributes As Any, ByVal dwStackSize As Long, ByVal lpStartAddress As Long, lpParameter As Any, ByVal dwCreationFlags As Long, lpThreadID As Long) As Long
  9. 'Terminates a thread
  10. Private Declare Function TerminateThread Lib "kernel32" (ByVal hThread As Long, ByVal dwExitCode As Long) As Long
  11. 'Sets the priority of a thread
  12. Private Declare Function SetThreadPriority Lib "kernel32" (ByVal hThread As Long, ByVal nPriority As Long) As Long
  13. 'Returns the proirity of a thread
  14. Private Declare Function GetThreadPriority Lib "kernel32" (ByVal hThread As Long) As Long
  15. 'Enables a disabled Thread
  16. Private Declare Function ResumeThread Lib "kernel32" (ByVal hThread As Long) As Long
  17. 'Disables a thread
  18. Private Declare Function SuspendThread Lib "kernel32" (ByVal hThread As Long) As Long
  19. 'Returns the handle of the current thread
  20. Private Declare Function GetCurrentThread Lib "kernel32" () As Long
  21. 'Returns the ID of the current thread
  22. Private Declare Function GetCurrentThreadId Lib "kernel32" () As Long
  23.  
  24. 'Consts
  25. Private Const MAXLONG = &H7FFFFFFF
  26.  
  27. 'Thread priority consts
  28. Private Const THREAD_BASE_PRIORITY_IDLE = -15
  29. Private Const THREAD_BASE_PRIORITY_LOWRT = 15
  30. Private Const THREAD_BASE_PRIORITY_MAX = 2
  31. Private Const THREAD_BASE_PRIORITY_MIN = -2
  32. Private Const THREAD_PRIORITY_HIGHEST = THREAD_BASE_PRIORITY_MAX
  33. Private Const THREAD_PRIORITY_LOWEST = THREAD_BASE_PRIORITY_MIN
  34. Private Const THREAD_PRIORITY_ABOVE_NORMAL = (THREAD_PRIORITY_HIGHEST - 1)
  35. Private Const THREAD_PRIORITY_BELOW_NORMAL = (THREAD_PRIORITY_LOWEST + 1)
  36. Private Const THREAD_PRIORITY_ERROR_RETURN = (MAXLONG)
  37. Private Const THREAD_PRIORITY_IDLE = THREAD_BASE_PRIORITY_IDLE
  38. Private Const THREAD_PRIORITY_NORMAL = 0
  39. Private Const THREAD_PRIORITY_TIME_CRITICAL = THREAD_BASE_PRIORITY_LOWRT
  40.  
  41. 'Thread creation flags
  42. Private Const CREATE_ALWAYS = 2
  43. Private Const CREATE_NEW = 1
  44. Private Const CREATE_NEW_CONSOLE = &H10
  45. Private Const CREATE_NEW_PROCESS_GROUP = &H200
  46. Private Const CREATE_NO_WINDOW = &H8000000
  47. Private Const CREATE_PROCESS_DEBUG_EVENT = 3
  48. Private Const CREATE_SUSPENDED = &H4
  49. Private Const CREATE_THREAD_DEBUG_EVENT = 2
  50.  
  51. 'Types and Enums
  52. Public Enum ThreadPriority
  53.    tpLowest = THREAD_PRIORITY_LOWEST
  54.    tpBelowNormal = THREAD_PRIORITY_BELOW_NORMAL
  55.    tpNormal = THREAD_PRIORITY_NORMAL
  56.    tpAboveNormal = THREAD_PRIORITY_ABOVE_NORMAL
  57.    tpHighest = THREAD_PRIORITY_HIGHEST
  58. End Enum
  59.  
  60. 'Vars
  61. Private mThreadHandle As Long
  62. Private mThreadID As Long
  63. Private mPriority As Long
  64. Private mEnabled As Boolean
  65. Private mCreated As Boolean
  66. Private mID As Long
  67. Public Function CreateNewThread(ByVal iDownloader As Long, ByVal cFunction As Long, Optional ByVal cPriority As Long = tpNormal, Optional ByVal cEnabled As Boolean = True)
  68.    'Creates a new Thread
  69.    Dim mHandle As Long
  70.    Dim CreationFlags As Long
  71.    Dim lpThreadID As Long
  72.  
  73.    'Look if the thread has already been created
  74.    If mCreated = True Then Exit Function
  75.  
  76.    'Look if the thread should be enabled
  77.    If cEnabled = True Then
  78.        CreationFlags = 0
  79.    Else
  80.        'Create a disabled thread, can be enabled later with the
  81.        ''Enabled' property
  82.        CreationFlags = CREATE_SUSPENDED
  83.    End If
  84.  
  85.    'The CreateThread Function returns the handle of the created thread;
  86.    'if the handle is 0, it failed creating the thread
  87.    mHandle = CreateThread(ByVal 0&, ByVal 0&, cFunction, ByVal 0&, CreationFlags, lpThreadID)
  88.  
  89.    If mHandle = 0 Then 'Failed creating the thread
  90.        'Insert your own error handling
  91.        'Debug.Print "InitializeThread Function in clsThreading failed creating a new thread"
  92.    Else
  93.        mThreadHandle = mHandle
  94.        mThreadID = lpThreadID
  95.        mCreated = True
  96.        mID = iDownloader
  97.    End If
  98. End Function
  99. Public Property Get iDownloader() As Long
  100.    iDownloader = mID
  101. End Property
  102. Public Function TerminateCurrentThread()
  103.    'Terminates the current thread
  104.  
  105.    'Ignore errors to prevent crashing if no thread has been created
  106.    On Error Resume Next
  107.    'Terminate the thread to prevent crashing if the app is closed
  108.    'and the thread is still running (dangerous!)
  109.    Call TerminateThread(mThreadHandle, ByVal 0&)
  110.    mCreated = False
  111. End Function
  112.  
  113. Public Property Get ThreadHandle() As Long
  114.    'Returns the Handle of the current Thread
  115.    ThreadHandle = mThreadHandle
  116. End Property
  117.  
  118. Public Property Get ThreadID() As Long
  119.    'Returns the ID of the current thread
  120.    ThreadID = mThreadID
  121. End Property
  122.  
  123. Public Property Get Priority() As Long
  124.    'Returns a long value because the thread might have other priorities
  125.    'than our five in the enum
  126.  
  127.    'Ignore errors to prevent crashing if no thread has been created
  128.    On Error Resume Next
  129.    Priority = GetThreadPriority(mThreadHandle)
  130. End Property
  131.  
  132. Public Property Let Priority(ByVal tmpValue As Long)
  133.    'Sets the Thread Priority of the actual thread
  134.    mPriority = tmpValue
  135.    Call SetThreadPriority(mThreadHandle, tmpValue)
  136. End Property
  137.  
  138. Public Property Get Enabled() As Boolean
  139.    'Returns whether the Thread is enabled or not
  140.    Enabled = mEnabled
  141. End Property
  142.  
  143. Public Property Let Enabled(ByVal tmpValue As Boolean)
  144.    'Enables/Disables the Thread
  145.  
  146.    'Ignore errors to prevent crashing if no thread has been created
  147.    On Error Resume Next
  148.    If tmpValue = True Then
  149.        'Enable the thread
  150.        Call ResumeThread(mThreadHandle)
  151.    ElseIf tmpValue = False Then
  152.        'Disable the thread
  153.        Call SuspendThread(mThreadHandle)
  154.    End If
  155. End Property
  156.  
  157. Private Sub Class_Terminate()
  158.    'Terminate the thread to prevent crashing if the app is closed
  159.    'and the thread is still running (dangerous!)
  160.    Call TerminateCurrentThread
  161. End Sub
  162.  

Código
  1. '----------------------------------------------------------------------------------------'
  2. '
  3. ' Multi Downloader using multithreadings
  4. ' Created by Suk Yong Kim, 03/14/2001
  5. '
  6. ' This project is my first project to upload to the PSC.
  7. ' Many persons contribute to create this project
  8. ' I really appreicate their efforts and codes and the great server PSC.
  9. '
  10. ' if any question, mail to : techtrans@dreamwiz.com
  11. '----------------------------------------------------------------------------------------'
  12.  
  13. Option Explicit
  14.  
  15. 'local variable to hold collection
  16. Private mCol As Collection
  17.  
  18.  
  19. Public Function CreateNewThread(ByVal iDownloader As Long, ByVal cFunction As Long, _
  20.    Optional ByVal cPriority As Long = tpNormal, _
  21.    Optional ByVal cEnabled As Boolean = True, Optional sKey As String) As clsThreading
  22.  
  23.    'create a new object
  24.    Dim objNewMember As clsThreading
  25.    Set objNewMember = New clsThreading
  26.  
  27.    'create new thread
  28.    Call objNewMember.CreateNewThread(iDownloader, cFunction, cPriority, cEnabled)
  29.  
  30.    If Len(sKey) = 0 Then
  31.      mCol.Add objNewMember
  32.    Else
  33.      mCol.Add objNewMember, sKey
  34.    End If
  35.  
  36.    'return the object created
  37.    Set CreateNewThread = objNewMember
  38.    Set objNewMember = Nothing
  39. Exit_Function:
  40. End Function
  41. Public Property Get Item(vntIndexKey As Variant) As clsThreading
  42.    Set Item = mCol(vntIndexKey)
  43. End Property
  44.  
  45. Public Property Get Count() As Long
  46.    Count = mCol.Count
  47. End Property
  48.  
  49. Public Sub TerminateThread(vntIndexKey As Variant)
  50.    On Error Resume Next
  51.    mCol.Remove vntIndexKey
  52. End Sub
  53.  
  54. Public Property Get NewEnum() As IUnknown
  55.    Set NewEnum = mCol.[_NewEnum]
  56. End Property
  57.  
  58. Private Sub Class_Initialize()
  59.    Set mCol = New Collection
  60. End Sub
  61.  
  62. Private Sub Class_Terminate()
  63.    On Error Resume Next
  64.    Set mCol = Nothing
  65. End Sub
  66.  
39  Seguridad Informática / Seguridad / Re: Nueva encuesta: Mejor Antivirus en: 16 Junio 2009, 02:58 am
jaja, la defensa pro activa del kaspersky vale muy poco cuando utilizas api unhook, su driver klif.sys apesta igual que su filtro NDIS, el nod no coge ni un resfriado, jajaja por experiencia personal como programador de malware me atrevo a decir que el avira es la mejor heuristica, eso si comparado con los demas avs del mercado, aunque cuando te das cuenta de la debilidad de su heuristica ya no sirve de mucho que digamos, asi que en conclusion todos apestan pero la elección es Avira
40  Seguridad Informática / Seguridad / Re: Nueva encuesta: Mejor Antivirus en: 16 Junio 2009, 00:52 am
jaja, la defensa pro activa del kaspersky vale muy poco cuando utilizas api unhook, su driver klif.sys apesta igual que su filtro NDIS, el nod no coge ni un resfriado, jajaja por experiencia personal como programador de malware me atrevo a decir que el avira es la mejor heuristica, eso si comparado con los demas avs del mercado, aunque cuando te das cuenta de la debilidad de su heuristica ya no sirve de mucho que digamos, asi que en conclusion todos apestan pero la elección es Avira
Páginas: 1 2 3 [4] 5 6 7 8 9 10 11 12 13 14 15 16
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines