Hi darren76, It is unclear to me whether you want to change the image of PictureBox or the cursor of the mouse. Here is the code for both Public Class Form1 Private imgList As ImageList Private current As Integer Public Sub New() InitializeComponent() Me.PictureBox1.Cursor = Cursors.PanEast imgList = New ImageList() imgList.ImageSize = New Size(100, 100) Dim imgFile1 = "D:\a.jpg" Dim imgFile2 = "D:\b.jpg" Dim img As Image = Image.FromFile(imgFile1) imgList.Images.Add(img) img = Image.FromFile(imgFile2) imgList.Images.Add(img) PictureBox1.Image = imgList.Images(0) current = 0 End Sub Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click current = current + 1 PictureBox1.Image = imgList.Images(current Mod 2) End Sub End Class The sample has only two picture, I store them in an ImageList, each time you click the PictureBox, the image will change to another one. As for the mouse cursor, I have set it to Cursors.PanEast. Does it what you need? Sincerely, Kira Qian Please mark the replies as answers if they help and unmark if they don't.- Marked As Answer bydarren76 Friday, July 17, 2009 3:47 PM
-
|