473,387 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How do i change mouse icon at runtime?

I'm programming in vb 2008 and i would like to change the mouse icon when the user crosses a certain object. I want the icon to be a picture of my own, not a system one. In vb6 it was really very simple and now i'm stuck with something aparantly so basic. I apreciate any help!
Thanks!
:)
Nov 12 '10 #1
2 2976
Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As _
  3. System.EventArgs) Handles MyBase.Load
  4. Me.Cursor = New Cursor("C:\Windows\Cursors\pen_m.cur")
  5. End Sub
  6. End Class
  7.  
Nov 12 '10 #2
Thanks for you answer, but it doesn't work with image cursor that i download from the net. They are valid cur files, because i'm able to change the mouse icon using directly the control panel, but when i try to change the mouse icon inside a vb event (like button_click), it says that the image is not valid and there is an error at the stream parameter. Do i have to declare or install somethig in order to make vb accept different cursor icons?
Nov 18 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: ATong | last post by:
A VC.net application, the 3 16777216-color icons, 16*16, 32*32 and 48*48, have been modified, but after rebuild the application, the icon does not change. Should we modify anything else to change...
1
by: Hai Ly Hoang | last post by:
Creating an Windows application with C# (a.exe). My program a.exe has default icon (in Windows Explorer). How to change default icon for my program ? (Certainly, not by creating an shortcuts to...
16
by: Phil Hey | last post by:
Hi, I can change the icon for a folder by right clicking on it > going to the customize tab > and selecting Choose Picture. Does anyone know if it is possible to do this programmatically...
1
by: Brett | last post by:
How can I change the icon of a form? This is the icon that appears in the upper left corner. Thanks, Brett
4
by: bagstoper | last post by:
how do i change the mouse icon in my program? i dont want it to be one of the ones already on my computer. how do i make a new icon. can it be any picture be an icon? do i need a special program to...
1
by: Hutch | last post by:
Is there a way to change the Icon of accessto a different picture? I want to do this in the program some how so when i rewrite the MDE file it will appear as a change on everyones desktop. If i just...
3
by: faraz | last post by:
I have set the exe icon from Project Properties->Application->ico. now i always have the same icon on the exe. how can i change the icon of exe programmatically?
7
by: kalar | last post by:
i make a JFrame window and i add a label i.e. myLabel , which has an image and down from the label a button i.e. dice. I want when i press the button to change the image on the label but when i am...
4
by: mistral | last post by:
Does it possible change favicon icon depending on browser type: display favicon.ico for Internet Explorer browsers, and favicon.gif for the rest browsers? Problem is that ugly MSIE can display only...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.