Hi all,
I program on a windows CE 6.0 device and I have a problem to move a picture box, when I move the picture box, it draw "marks" behind it.
There are picture of picturebox movement on my program :
ImageShack® - Online Photo and Video Hosting
ImageShack® - Online Photo and Video Hosting
here is my vb code :
Imports System.Object
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms
Imports System.Threading.Thread
Imports System.IO.Ports
Public Class Form1
Dim x As Integer
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
If e.Button = MouseButtons.Left Then
x = e.X
End If
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If e.Button = MouseButtons.Left Then
PictureBox1.Left += (e.X - x)
End If
End Sub
End Class
Thanks for your help.
I program on a windows CE 6.0 device and I have a problem to move a picture box, when I move the picture box, it draw "marks" behind it.
There are picture of picturebox movement on my program :
ImageShack® - Online Photo and Video Hosting
ImageShack® - Online Photo and Video Hosting
here is my vb code :
Imports System.Object
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms
Imports System.Threading.Thread
Imports System.IO.Ports
Public Class Form1
Dim x As Integer
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
If e.Button = MouseButtons.Left Then
x = e.X
End If
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If e.Button = MouseButtons.Left Then
PictureBox1.Left += (e.X - x)
End If
End Sub
End Class
Thanks for your help.