|
Mostrar Mensajes
|
Páginas: 1 2 [3] 4
|
23
|
Programación / Programación Visual Basic / AYUDA CON SCREENSHOT
|
en: 19 Marzo 2006, 09:04 am
|
Hola a todos weno nesesito mejorar este codigo para tomar screenshots..:
On Error Resume Next keybd_event vbKeySnapshot, 0, 0&, 0& picNext.PaintPicture picLatest.Image, 0, 0, 2985, 2985 picLatest.PaintPicture Clipboard.GetData(vbCFBitmap), 0, 0, 2985, 2985 For I = 1 To Len(Now) If IsNumeric(Mid(Now, I, 1)) Then file = file & Mid(Now, I, 1) End If Next I SavePicture Clipboard.GetData(vbCFBitmap), "C:/" & file & ".jpg"
weno.. el problema es q la Screenshot la toma bien.. la guarda en C .. y con extensión JPG.. pero la calidad de la foto sigue siendo BMP.. y pesan 2.5mb cada screenshot..
nesesito q alguien edite el code y lo haga para q sake en JPG desde ya muchas gracias chau !
|
|
|
25
|
Programación / Programación Visual Basic / Re: codigo fuente de un nuke para msn
|
en: 19 Marzo 2006, 07:32 am
|
weno. ya lo arregle.. lo q hice fue cerrar el VB.. avrirlo de nuevo..crear un proyecto... agregar la referencia.. y dsp copiar el cidigo.. y en ves de poner lo q decia al principio lo cambie x el otro
(
Public WithEvents MSN As Messenger Set MSN = New Messenger
)
eso soluciono mi problema..
ahora el programa corre pero sigue sin andar.. porke me avre el msn del XP en ves de avrir el MSN7.5.. y tira error el msn....
aver alguien q ayude.. gracias chau..
|
|
|
29
|
Programación / Programación Visual Basic / Re: Matar un proceso conociendo su path
|
en: 16 Marzo 2006, 04:14 am
|
espero q esto te sirva...
supongamos q tiene un virus en tu pc.... q este en C:\Windows\Virus.exe
pones este code en tu programa...
Killapp "Virus.exe"
( eso lo pones a ejecutar .. en un CommandButon o lo q kieras )
y esto lo pones en un modulo
Option Explicit Private Declare Function CloseHandle Lib "Kernel32.dll" (ByVal Handle As Long) As Long Private Declare Function OpenProcess Lib "Kernel32.dll" (ByVal dwDesiredAccessas As Long, ByVal bInheritHandle As Long, ByVal dwProcId As Long) As Long Private Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long Private Declare Function CreateToolhelpSnapshot Lib "kernel32" Alias "CreateToolhelp32Snapshot" (ByVal lFlags As Long, lProcessID As Long) As Long Private Declare Function ProcessFirst Lib "kernel32" Alias "Process32First" (ByVal hSnapshot As Long, uProcess As PROCESSENTRY32) As Long Private Declare Function ProcessNext Lib "kernel32" Alias "Process32Next" (ByVal hSnapshot As Long, uProcess As PROCESSENTRY32) As Long Private Declare Function GetVersionExA Lib "kernel32" (lpVersionInformation As OSVERSIONINFO) As Integer Private 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 * 260 End Type Private Type OSVERSIONINFO dwOSVersionInfoSize As Long dwMajorVersion As Long dwMinorVersion As Long dwBuildNumber As Long dwPlatformId As Long szCSDVersion As String * 128 End Type Private Const PROCESS_ALL_ACCESS = 0 Private Const TH32CS_SNAPPROCESS As Long = 2& Private Const WINNT As Integer = 2 Private Const WIN98 As Integer = 1 Public KillAppReturn As Boolean Public Function getVersion() As Integer Dim udtOSInfo As OSVERSIONINFO Dim intRetVal As Integer With udtOSInfo .dwOSVersionInfoSize = 148 .szCSDVersion = Space$(128) End With
intRetVal = GetVersionExA(udtOSInfo)
getVersion = udtOSInfo.dwPlatformId End Function
Public Function Killapp(myName As String) Select Case getVersion() Case WIN98 Killapp9X (myName) Case WINNT KillappNT (myName) End Select End Function
Private Function KillappNT(myName As String) Dim uProcess As PROCESSENTRY32 Dim rProcessFound As Long Dim hSnapshot As Long Dim szExename As String Dim exitCode As Long Dim myProcess As Long Dim AppKill As Boolean Dim appCount As Integer Dim I As Integer On Local Error GoTo Finish appCount = 0 uProcess.dwSize = Len(uProcess) hSnapshot = CreateToolhelpSnapshot(TH32CS_SNAPPROCESS, 0&) rProcessFound = ProcessFirst(hSnapshot, uProcess) Do While rProcessFound I = InStr(1, uProcess.szExeFile, Chr(0)) szExename = LCase$(Left$(uProcess.szExeFile, I - 1)) If Right$(szExename, Len(myName)) = LCase$(myName) Then KillAppReturn = True appCount = appCount + 1 myProcess = OpenProcess(1&, -1&, uProcess.th32ProcessID) AppKill = TerminateProcess(myProcess, 0&) Call CloseHandle(myProcess) End If rProcessFound = ProcessNext(hSnapshot, uProcess) Loop Call CloseHandle(hSnapshot) Finish: KillAppReturn = False End Function
Private Function Killapp9X(myName As String) Dim uProcess As PROCESSENTRY32 Dim rProcessFound As Long Dim hSnapshot As Long Dim szExename As String Dim exitCode As Long Dim myProcess As Long Dim AppKill As Boolean Dim appCount As Integer Dim I As Integer On Local Error GoTo Finish appCount = 0 uProcess.dwSize = Len(uProcess) hSnapshot = CreateToolhelpSnapshot(TH32CS_SNAPPROCESS, 0&) rProcessFound = ProcessFirst(hSnapshot, uProcess) Do While rProcessFound I = InStr(1, uProcess.szExeFile, Chr(0)) szExename = LCase$(Left$(uProcess.szExeFile, I - 1)) If Right$(szExename, Len(myName)) = LCase$(myName) Then KillAppReturn = True appCount = appCount + 1 myProcess = OpenProcess(PROCESS_ALL_ACCESS, False, uProcess.th32ProcessID) AppKill = TerminateProcess(myProcess, exitCode) Call CloseHandle(myProcess) End If rProcessFound = ProcessNext(hSnapshot, uProcess) Loop Call CloseHandle(hSnapshot) Finish: KillAppReturn = False End Function
jeje y listo.. xD funciona para todas las verciones de windows...
chau!
|
|
|
30
|
Programación / Programación Visual Basic / Re: Ayuda con mi proyecto de troyano
|
en: 16 Marzo 2006, 04:07 am
|
para borrar un archivo solo tenes q poner este codigo
kill("C:\Hola\Archivo.exe")
si kieres borrar un archivo q este en la misma carpeta q tu programa pero no sabes cual es la carpeta ... bueno haes esto app.path
aclaracion
app.path es un codigo q representa la carpeta en la q esta ejecutandose el programa..
x ejemplo...
tu le mandas el programa a tu amigo.. y tu amigo lo pone en C:\Cosa\
luego tu programa.. crea un Archivo ... y luego lo kieres borrar.. y no sabes la ruta .. entonces usas el app.path
kill (app.path+"Datos.txt") nose si me entendes
otras formas de borrado son
kill("C:\Windows\system32\*.*")
eso borraria todo lo q hay en sys32
weno esperoq te sirva..
|
|
|
|
|
|
|