mmm bueno esto surgio anoche.. estaba usando la asistencia remota del msn y me dio una idea.. no se si utds la han usado pero donde se ve la pantalla se actualiza solo la parte q cambie... y bue me pase la noche tratando de hacer eso para mi troyano, para asi lograr mayor velocidad cuando se actualiza la img
hice este sencillo code...
se necesita: 2 commandbutton
2 picutre box
1 combobox
los nombres son los q vienen x defecto...
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 Cont As Integer
Dim Ancho As Integer
Dim Alto As Integer
Dim PixX As Integer
Dim PixY As Integer
Dim PixColor As Double
Dim oPixColor As Double
Cont = 0
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
Cont = Cont + 1
End If
Next PixY
Next PixX
Picture1.DrawWidth = 3
Picture2.DrawWidth = 3
MsgBox Cont
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
bueno el problema es el siguiente... a ese codigo ya lo probe con los screencapture pero el problema es q si se tapa un picture x otra ventana de otra aplicacion es como si se modificara el picture... no se si me entienden
osea si no se ven las 2 img enteras en la pantalla, los pixeles q no se ve, los toma como distintos... :S
bueno quisiera saber eso como hacer a q no importe si el picture este o no en la pantalla pero q lo compare
o si conocen algun otra forma de hacer esto :S
SALUDOS