Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mouse Icon

Status
Not open for further replies.

cannonenter

Programmer
Mar 27, 2003
20
GB
I have a application that i wish to add a Different Mouse Icon to a Label. I have found it in the VB File and then copied it to the App dir.

How do i code the app to find the Mouse icon from the Application Path

Many thanks

Stephen Rattray
 
MyLabel.MouseIcon = App.Path & "\" & MyIcon.ico

where MyLabel is your label name and MyIcon.ico is the name of your icon file.
I'm not shure about the necessity of the "\" , but trie it.

Hope I've been helpful,
Bogdan Muresan.
 
My recent post was for setting the property at runtime but you can do it very simple at design time: there is a dedicated property of the label for this purpose (MouseIcon).


Hope I've been helpful,
Bogdan Muresan.
 
I'm not shure about the necessity of the "\" , but trie it.
It's certainly needed in W2K and later, but I seem to recall it was already included in the App.Path in an earlier OS

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
Hm, ... kind of, johnwm. If I remember correctly, for Win '98 it was included only if App.Path was "C:\" (a route directory) and not if it was a "normal" path. Or it was vice versa??
That's way I told to trie it :)
I realy don't remember.
 
Thanks for all the help.

I have used the following code.

lblplay.MousePointer = 99

lblplay.MouseIcon = App.Path & "\" & H_NW.CUR


But it still comes up with Run Time Error '424' Object Required.

I have copied the Cursor to the Application directory. So the cursor is there.

Any surgestions?

Thanks
Stephen Rattray
 
Ah!
You should write:

lblplay.MouseIcon = App.Path & "\H_NW.CUR"

If this does not work, then:

lblplay.MouseIcon = LoadPicture(App.Path & "\H_NW.CUR")
 
Ah!
You should write:

lblplay.MouseIcon = App.Path & "\H_NW.CUR"

If this does not work, then:

lblplay.MouseIcon = LoadPicture(App.Path & "\H_NW.CUR")

Hope I've been helpful,
Bogdan Muresan.
 
BogdanMBM


The code works great.
I placed
lblplay.MouseIcon = LoadPicture(App.Path & "\H_NW.CUR")

Into the Application and it got the Icon that i wish to use.

You are the best helper

Many thanks

Stephen Rattray
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top