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

 

 


Tema destacado: Tutorial básico de Quickjs


  Mostrar Mensajes
Páginas: 1 ... 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 [23] 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 ... 46
221  Programación / Programación Visual Basic / Re: Zoom en VB en: 14 Abril 2007, 02:55 am
Hola, mira podrias usar
Código:
Color = Form1.Point(X, Y)
eso te da un color y una posicion y en otro Form podrias hacer un
Código:
Form2.Line (X-1), (Y-1), Color
y te las arreglas con los For para hacer en el Form1 una sola pasada, y en el Form2 una pasada que lo multiplique al ancho y alto x 2

PD: Tengo un programa hecho en VB6, que simula la Lupa de WinXP, si lo queres agregame y te lo paso, ya que no se donde subirlo, y dsp lo subis vos.


Sancho.Mazorka   :¬¬
222  Programación / Programación Visual Basic / Re: Problema con bucle While en vb 6.0 en: 14 Abril 2007, 02:39 am
Usen las etiquetas de code  :)


Sancho.Mazorka    :¬¬
223  Programación / Programación Visual Basic / Re: [Pedido] cmd pipe en vb6 en: 11 Abril 2007, 22:52 pm
Código:
'Redirects output from console program to textbox.
'Requires two textboxes and one command button.
'Set MultiLine property of Text2 to true.
'
'Original bcx version of this program was made by
' dl <dl@tks.cjb.net>
'VB port was made by Jernej Simoncic <jernej@isg.si>
'Visit Jernejs site at http://www2.arnes.si/~sopjsimo/
'
'Note: don't run plain DOS programs with this example
'under Windows 95,98 and ME, as the program freezes when
'execution of program is finnished.

Option Explicit
Private Declare Function CreatePipe Lib "kernel32" (phReadPipe As Long, phWritePipe As Long, lpPipeAttributes As SECURITY_ATTRIBUTES, ByVal nSize As Long) As Long
Private Declare Sub GetStartupInfo Lib "kernel32" Alias "GetStartupInfoA" (lpStartupInfo As STARTUPINFO)
Private Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, lpProcessAttributes As Any, lpThreadAttributes As Any, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, lpEnvironment As Any, ByVal lpCurrentDriectory As String, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Declare Function ReadFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, lpOverlapped As Any) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long

Private Type SECURITY_ATTRIBUTES
  nLength As Long
  lpSecurityDescriptor As Long
  bInheritHandle As Long
End Type

Private Type PROCESS_INFORMATION
  hProcess As Long
  hThread As Long
  dwProcessId As Long
  dwThreadId As Long
End Type

Private Type STARTUPINFO
  cb As Long
  lpReserved As Long
  lpDesktop As Long
  lpTitle As Long
  dwX As Long
  dwY As Long
  dwXSize As Long
  dwYSize As Long
  dwXCountChars As Long
  dwYCountChars As Long
  dwFillAttribute As Long
  dwFlags As Long
  wShowWindow As Integer
  cbReserved2 As Integer
  lpReserved2 As Byte
  hStdInput As Long
  hStdOutput As Long
  hStdError As Long
End Type

Private Type OVERLAPPED
    ternal As Long
    ternalHigh As Long
    offset As Long
    OffsetHigh As Long
    hEvent As Long
End Type

Private Const STARTF_USESHOWWINDOW = &H1
Private Const STARTF_USESTDHANDLES = &H100
Private Const SW_HIDE = 0
Private Const EM_SETSEL = &HB1
Private Const EM_REPLACESEL = &HC2

Private Sub Command1_Click()
  Command1.Enabled = False
  Redirect Text1.Text, Text2
  Command1.Enabled = True
End Sub
Private Sub Form_Load()
    Text1.Text = "ping"
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  If Command1.Enabled = False Then Cancel = True
End Sub

Sub Redirect(cmdLine As String, objTarget As Object)
  Dim i%, t$
  Dim pa As SECURITY_ATTRIBUTES
  Dim pra As SECURITY_ATTRIBUTES
  Dim tra As SECURITY_ATTRIBUTES
  Dim pi As PROCESS_INFORMATION
  Dim sui As STARTUPINFO
  Dim hRead As Long
  Dim hWrite As Long
  Dim bRead As Long
  Dim lpBuffer(1024) As Byte
  pa.nLength = Len(pa)
  pa.lpSecurityDescriptor = 0
  pa.bInheritHandle = True
 
  pra.nLength = Len(pra)
  tra.nLength = Len(tra)

  If CreatePipe(hRead, hWrite, pa, 0) <> 0 Then
    sui.cb = Len(sui)
    GetStartupInfo sui
    sui.hStdOutput = hWrite
    sui.hStdError = hWrite
    sui.dwFlags = STARTF_USESHOWWINDOW Or STARTF_USESTDHANDLES
    sui.wShowWindow = SW_HIDE
    If CreateProcess(vbNullString, cmdLine, pra, tra, True, 0, Null, vbNullString, sui, pi) <> 0 Then
      SetWindowText objTarget.hwnd, ""
      Do
        Erase lpBuffer()
        If ReadFile(hRead, lpBuffer(0), 1023, bRead, ByVal 0&) Then
          SendMessage objTarget.hwnd, EM_SETSEL, -1, 0
          SendMessage objTarget.hwnd, EM_REPLACESEL, False, lpBuffer(0)
          DoEvents
        Else
          CloseHandle pi.hThread
          CloseHandle pi.hProcess
          Exit Do
        End If
        CloseHandle hWrite
      Loop
      CloseHandle hRead
    End If
  End If
End Sub

Espero que te sirva, es de la API-GUIDE


Sancho.Mazorka    :¬¬
224  Programación / Programación Visual Basic / Re: Trabajndo con ficheros en: 11 Abril 2007, 22:14 pm
Celaya me decis que hacia la funcion seek que no me acuerdo  >:(


Sancho.Mazorka    :¬¬
225  Programación / Programación Visual Basic / Re: [Source] Pixel Infection en: 8 Abril 2007, 00:27 am
Y tu lista de codigos sigue!  :o    Esta muy bueno el jueguito, me emocione  :xD


Sancho.Mazorka    :¬¬
226  Programación / Programación Visual Basic / Re: Capturar Imagen de video en: 7 Abril 2007, 22:44 pm
Agrega esto con las otras Constantes

Código:
Private Const COPY_IMAGE As Long = 1054

Al hacer click en el Form, la imagen se copia al portapapeles  ::)

Código:
Private Sub Form_Click()
SendMessage mCapHwnd, COPY_IMAGE, 0, 0
End Sub



Sancho.Mazorka    :¬¬
227  Programación / Programación Visual Basic / Me cago en la MSDN ! en: 7 Abril 2007, 10:43 am
Estaba buscando informacion para manejar la WebCam, encontre constantes para enviar con la API SendMessage y me muestra las constantes...pero no los valores de las constantes, como mierd4 quiere que use las constantes si no tiene los valores!!! 
INFO ACA

Si alguien me ayuda...Se lo agradecere, quiero saber como hacerle Zoom, Mover el Foco, etc. Como la libreria IC o Pegasus


Sancho.Mazorka    :¬¬
228  Programación / Programación Visual Basic / Hagamos nuestra lib de DirectX en: 7 Abril 2007, 08:15 am
Hola gente, hace mucho que no hago un post nuevo y como a mucha gente le esta interesando DirectX les vengo a proponer esto:
Hagamos nuestra propia libreria de DirectX, de esa forma aprendemos a usarla y a despues podemos hacer un juego   ::)  Yo estoy decidido a hacerlo, no se ustedes, pero si quieren dejen sus datos o manden privado. Alguien que creo que le va a gustar la idea es a EON  ;D



Sancho.Mazorka    :¬¬
229  Programación / Ejercicios / Re: seria un buen virus en bat? en: 7 Abril 2007, 07:59 am
Tengo muy poca esperiencia con Batch pero algo se, me dirias que hace esto ? :)


Sancho.Mazorka    :¬¬
230  Programación / Programación Visual Basic / Re: puedo hacer algo con la red lan? en: 7 Abril 2007, 06:45 am
Supongo que lo primero que tendrias que hacer seria obtener las maquinas en red con su ip, luego hacer que el programa se copie a cada una de las pc's...

Cualkier otra cosa avisanos!  ::)


Sancho.Mazorka    :¬¬
Páginas: 1 ... 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 [23] 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 ... 46
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines