mira hice este programa hace un tiempo con la idea de lograr capturas de pantalla de manera mas veloz para mi troyano. mi idea en ese entonces era tomar una captura de pantalla, enviarla al cliente y tb guardarla en el servidor, luego tomar una segunda y compararla ocn la primera y enviar solamente las partes q difieran...
bueno logre poder comparar 2 imagenes pequeñas, pero el problema es q para comparar los screen tienen q estar los dos cargaods en la pantalla... y obviamente en una pantalla no se peuden cargar 2 xD...
en fin el proyecto donde "experimente" quedo asi...
(decime si te sirve)
necesita: un combobox 2 picturebox 2 commandbutton: (1 caption compara y el 2º limpiar)
Dim Presionado As Boolean
Dim Color As ColorConstants
Private Sub Combo1_Click()
Select Case Combo1.Text
Case "Rojo"
Color = vbRed
Case "Azul"
Color = vbBlue
Case "Verde"
Color = vbGreen
End Select
End Sub
Private Sub Command1_Click()
Dim Ancho As Integer
Dim Alto As Integer
Dim PixX As Integer
Dim PixY As Integer
Dim PixColor As Double
Dim oPixColor As Double
Alto = Picture1.Height
Ancho = Picture1.Width
Picture1.DrawWidth = 1
Picture2.DrawWidth = 1
For PixX = 1 To Ancho Step 10
For PixY = 1 To Alto Step 10
PixColor = Picture1.Point(PixX, PixY)
oPixColor = Picture2.Point(PixX, PixY)
If Not PixColor = oPixColor Then
Color = Picture1.Point(PixX, PixY)
Picture2.PSet (PixX, PixY), Color
End If
Next PixY
Next PixX
Picture1.DrawWidth = 3
Picture2.DrawWidth = 3
End Sub
Private Sub Command2_Click()
Picture1.Cls
Picture2.Cls
End Sub
Private Sub Form_Load()
Picture1.Height = 1500
Picture2.Height = 1500
Picture1.Width = 1500
Picture2.Width = 1500
Picture1.DrawWidth = 3
Picture2.DrawWidth = 3
Picture1.BackColor = vbWhite
Picture2.BackColor = vbWhite
With Combo1
.AddItem "Rojo"
.AddItem "Verde"
.AddItem "Azul"
End With
End Sub
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Presionado = True
Picture1.CurrentX = X
Picture1.CurrentY = Y
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Presionado = False Then Exit Sub
Picture1.Line -(X, Y), Color
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Presionado = False
End Sub
Private Sub Picture2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Presionado = True
Picture2.CurrentX = X
Picture2.CurrentY = Y
End Sub
Private Sub Picture2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Presionado = False Then Exit Sub
Picture2.Line -(X, Y), Color
End Sub
Private Sub Picture2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Presionado = False
End Sub
desp tendrias q modificarlo para q x ejemplo busque los pixeles del picture1 en el picture 2
espero q sirva
SALUDOS