Groups | Blog | Home
all groups > vb.net controls > may 2004 >

vb.net controls : Changing Pictures during Run Time & Using a Custom Cursor


divpip NO[at]SPAM hotmail.com
5/9/2004 9:24:15 AM
i have 2 questions

1) Theres no way in the properties menu of a form to set a cursor as a
custom cursor, and ive not found anyway to do this - is there a way
using programming to do this - i thought possible if you got an image
to respond to mouse movements and paste itself over the usual cursor u
could create the same effect but again i am not sure how to
distinguish mousemove up, down, left and right from each other

so basically - is there a way i can have a custom cursor on a windows
form

2) In VB6 it was possible to change the appearance of an
image/picturebox during runtime using a command such as -
Picturebox1.Image = LoadPicture("C:\blahblah\blah.bmp")

and i want to do a similar process in vbNET
how?
so again - basically how du i change the image of a picturebox during
runtime?

help with either of these is welcome
Ken Tucker [MVP]
5/9/2004 12:35:06 PM
Hi,

1) Me.Cursor = New Cursor("C:\mycursor.cur")

2) PictureBox1.Image = Image.FromFile("C:\camera.bmp")

Ken
----------------------
[quoted text, click to view]

divpip NO[at]SPAM hotmail.com
5/11/2004 8:18:45 AM
thats great both work perfectly - thank you for simple straight-to-the
AddThis Social Bookmark Button