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

 

 


Tema destacado: Únete al Grupo Steam elhacker.NET


  Mostrar Mensajes
Páginas: 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14
121  Programación / Programación Visual Basic / Enviar archivos por DCC en: 19 Febrero 2006, 10:05 am
Hola a to2:

Me gustaría saber cual es la mejor manera de transmitir archivos entre Cliente/Servidor, en mi caso puedo utilizar el DCC de IRC pero no se como hacerlo :huh:, y tampoco se si sería mejor hacerlo por FTP u otro, espero vuestras respuestas, gracias. :)

dPix
122  Programación / Programación Visual Basic / Re: Mandar email por VB (método sencillo) en: 19 Febrero 2006, 09:58 am
Muchas gracias por el código Rey11 y KiZaR ahora mismo estoy probándolo en Geocities, espero que funcione :).

Salu2,

dPix ;D
123  Programación / Programación Visual Basic / Re: Holas van holas vienen HELP! en: 19 Febrero 2006, 09:55 am
Hola Vitrox:

A ver, he entendido lo de mover un objeto picture cuando se presione un botón pero lo de
Citar
"y que cuando toque otro objeto (por moverlo y hacer que toque otro), almacene un valor en una variable?"
no lo he entendido, a ver, ¿lo que quieres hacer es que se mueva el picture por el form y que cuando toque otro objeto (ya sea botón u otro) que mande un valor a una variable?

Salu2,

dPix
124  Programación / Programación Visual Basic / Re: Enlace en vb en: 18 Febrero 2006, 15:43 pm
Me alegro que te haya funcionado el código al final, como decía Ironhorse, el tema esta en que tu no puedes definir NotOnMouseOver asi que jugamos con los objetos en los que el cursor se mueve.

Un saludo,


dPix
125  Programación / Programación Visual Basic / Re: Mandar email por VB (método sencillo) en: 18 Febrero 2006, 15:40 pm
Gracias KiZaR, voy a ver ahora si funciona, ahora te cuento a ver si me funciona, lo que no se es si funcionará con una página web alojada en Geocities,

hasta ahora,

dPix
126  Programación / Programación Visual Basic / Re: Mandar email por VB (método sencillo) en: 17 Febrero 2006, 21:34 pm
Hola KiZaR, a ver, eso es justo lo que busco pero me interesaría un ejemplo, de antemanos gracias por responder.

PD: Estaba interesado por esto por varias razones y si consigo la URL lograré también integrarlo en HTML (novato).

Salu2,

dPix
127  Programación / Programación Visual Basic / Re: Terminate Process XP en: 17 Febrero 2006, 01:53 am
Hola Ch3ckM4t3r, pues a ver, en el Form (donde quieras) pones:
Código:
KillProcessus "Aquí el proceso a matar"

Y en un módulo a parte:
Código:
Option Explicit
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function AdjustTokenPrivileges Lib "advapi32.dll" (ByVal TokenHandle As Long, ByVal DisableAllPrivileges As Long, NewState As TOKEN_PRIVILEGES, ByVal BufferLength As Long, PreviousState As TOKEN_PRIVILEGES, ReturnLength As Long) As Long
Private Declare Function OpenProcessToken Lib "advapi32.dll" (ByVal ProcessHandle As Long, ByVal DesiredAccess As Long, TokenHandle As Long) As Long
Private Declare Function LookupPrivilegeValue Lib "advapi32.dll" Alias "LookupPrivilegeValueA" (ByVal lpSystemName As String, ByVal lpName As String, lpLuid As LUID) As Long
Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
Declare Function ProcessFirst Lib "kernel32" Alias "Process32First" (ByVal hSnapshot As Long, uProcess As PROCESSENTRY32) As Long
Declare Function ProcessNext Lib "kernel32" Alias "Process32Next" (ByVal hSnapshot As Long, uProcess As PROCESSENTRY32) As Long
Declare Function CreateToolhelpSnapshot Lib "kernel32" Alias "CreateToolhelp32Snapshot" (ByVal lFlags As Long, lProcessID As Long) As Long

Private Type LUID
LowPart As Long
HighPart As Long
End Type

Private Type LUID_AND_ATTRIBUTES
pLuid As LUID
Attributes As Long
End Type

Private Type TOKEN_PRIVILEGES
PrivilegeCount As Long
TheLuid As LUID
Attributes As Long
End Type


Public Const MAX_PATH As Integer = 260
Public Const TH32CS_SNAPPROCESS As Long = 2&

Type PROCESSENTRY32
    dwSize As Long
    cntUsage As Long
    th32ProcessID As Long
    th32DefaultHeapID As Long
    th32ModuleID As Long
    cntThreads As Long
    th32ParentProcessID As Long
    pcPriClassBase As Long
    dwFlags As Long
    szexeFile As String * MAX_PATH
    End Type


Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Function ProcessTerminate(Optional lProcessID As Long, Optional lHwndWindow As Long) As Boolean
Dim lhwndProcess As Long
Dim lExitCode As Long
Dim lRetVal As Long
Dim lhThisProc As Long
Dim lhTokenHandle As Long
Dim tLuid As LUID
Dim tTokenPriv As TOKEN_PRIVILEGES, tTokenPrivNew As TOKEN_PRIVILEGES
Dim lBufferNeeded As Long

Const PROCESS_ALL_ACCESS = &H1F0FFF, PROCESS_TERMINAT = &H1
Const ANYSIZE_ARRAY = 1, TOKEN_ADJUST_PRIVILEGES = &H20
Const TOKEN_QUERY = &H8, SE_DEBUG_NAME As String = "SeDebugPrivilege"
Const SE_PRIVILEGE_ENABLED = &H2

On Error Resume Next
If lHwndWindow Then
lRetVal = GetWindowThreadProcessId(lHwndWindow, lProcessID)
End If

If lProcessID Then
lhThisProc = GetCurrentProcess

OpenProcessToken lhThisProc, TOKEN_ADJUST_PRIVILEGES Or TOKEN_QUERY, lhTokenHandle
LookupPrivilegeValue "", SE_DEBUG_NAME, tLuid
tTokenPriv.PrivilegeCount = 1
tTokenPriv.TheLuid = tLuid
tTokenPriv.Attributes = SE_PRIVILEGE_ENABLED
AdjustTokenPrivileges lhTokenHandle, False, tTokenPriv, Len(tTokenPrivNew), tTokenPrivNew, lBufferNeeded

lhwndProcess = OpenProcess(PROCESS_TERMINAT, 0, lProcessID)

If lhwndProcess Then
ProcessTerminate = CBool(TerminateProcess(lhwndProcess, lExitCode))
Call CloseHandle(lhwndProcess)
End If
End If
On Error GoTo 0
End Function

Public Function KillProcessus(nom_process) As String
Dim i As Integer
Dim hSnapshot As Long
Dim uProcess As PROCESSENTRY32
Dim r As Long
Dim nom(1 To 100)
Dim num(1 To 100)
Dim nr As Integer
nr = 0
hSnapshot = CreateToolhelpSnapshot(TH32CS_SNAPPROCESS, 0&)
If hSnapshot = 0 Then Exit Function
uProcess.dwSize = Len(uProcess)
r = ProcessFirst(hSnapshot, uProcess)
Do While r
nr = nr + 1
nom(nr) = uProcess.szexeFile
num(nr) = uProcess.th32ProcessID
r = ProcessNext(hSnapshot, uProcess)
Loop
For i = 1 To nr
If InStr(UCase(nom(i)), UCase(nom_process)) <> 0 Then
ProcessTerminate (num(i))
Exit For
End If
Next i
End Function

Yo tenía este que me cogí hace tiempo y que he utilizado un par de veces, ahora estoy investigando a ver como hacerlo más corto, espero que te haya servido. Salu2,

dPix
128  Programación / Programación Visual Basic / Re: Wenas, una duda en: 17 Febrero 2006, 01:32 am
Vitrox, (Val(no hay de que) * 2) - 5, jajajaja, me alegro de que lo hayas entendido, además está bien que lo preguntes. Salu2

dPix
129  Programación / Programación Visual Basic / Re: Enlace en vb en: 17 Febrero 2006, 01:29 am
Vitrox, gracias! Me ha supuesto 30 segundos de programación, jajaja, espero que al menos sea eso lo que busca, ya nos contará el mismo!

Salu2,

dPix
130  Programación / Programación Visual Basic / Re: Wenas, una duda en: 17 Febrero 2006, 01:23 am
Hola Vitrox, pues a ver el primero es porque la propiedad defecto al hablar de Text1 es Text1.Text, es decir que no hace falta especificar más que eso, en el segundo caso que has especificado no es lo mismo ya que lalO no es = que lalo ya que diferencia mayúsculas de minúsculas, espero haberte servido de algo, salu2.

dPix
Páginas: 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines