Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Hand Cursor

Is there any way to set a control's MousePointer to the "hand" cursor (the pointing finger) without having to use a custom MouseIcon (as this would appear different to users who are using a different cursor set)?

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Have A Hand Cursor?
when a user mouses over an image, how can I make the cursor become a hand

Anyone Know Where I Can The Hand Cursor?

I'm looking for a hand cursor - the one where it's a bit like over a html hyperlink, (not the hand with the sleeve).

I had to reinstall Windows so I no longer have it in my cursor folder. And I've checked around the internet but had no luck. Anyone know where I can get it? Could someone email it to me?



How Do I Get The Hand Cursor?
I need to get that hand cursor to show whenever the mouse moves over, say some button on the form, or a label. How do I do it?

oh yeah.. how do i make the label text blue?

Link Hand Cursor
I have looked through all the mouse cursors adn icons held on my computer and i have also searched the internet but can not seem to find the icon used when the mouse pointer hovers over a hyperlink ??

Can anyone here please help ?

Hand (URL) Cursor Over Label
I am trying to convert the screen mouse cursor to the hyperlink hand using the Loadimage and Setcursor functions. As these functions are available, I'd rather not use an .ico file with a custom VB mousepointer.

Const OCR_HAND As Long = 32649
Const LR_DEFAULTSIZE As Long = &H40

Private Declare Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal hInst As Long, ByVal lpsz As String, ByVal un1 As Long, ByVal n1 As Long, ByVal n2 As Long, ByVal un2 As Long) As Long
Private Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As Long

Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim hCur As Long
Setcursor hCur
End Sub

The MSDN indicates that I must use the MAKEINTRESOURCE macro, but has no clue as to how to use it in VB.

Does Anyone Have A 'hand Pointer' Cursor?
Does anyone have a cursor (.cur) file for a hand pointer (like the one when you point on a link in IE?

I have an icon file like that but when icon file is used the pointing pixel is set at the middle of the image instead of the upper left pixel...

Hand-type Cursor?
Where can I get hand-type cursor like in Internet Explorer when you get over a link! Not that from Vb!

A Good Hand Cursor
I need A good hand cursor for my VB Application.
If possible the one which comes when you hover
over a link in a IE browser.?

I do not find good hand cursors in my system?

Shadow Under Hand Cursor
Hi List,

Notice that in Win2K, the mouse pointer has a shadow. When I assign auser-defined mouseicon to a control within VB6, this icon doesn't
have the same shadow.
Specifically, I have a cursor called HAND.CUR (the same as the hand yousee on web pages) and use this frequently in my applications, but
it doesn't have the same shadow as the standard arrow pointer etc.

Anyone know how I can invoke the HAND cursor with a shadow in VB6?

Yeah I know, im fussy but this is bugging me ;-)


Change The Cursor To A Hand?
in Excel VB editor 2003, I have a checkbob and I want to change the cursor to a hand ponter when it's floating over the checkbox. Any thoughts? thanks

Private Sub CheckBox1_Click()
checkboxstatus = True
End Sub

SQL2005// CRXIr2// XP Pro

"Progress lies not in enhancing what is, but in advancing toward what will be"
-KHALIL GIBRAN 1883-1931

How To Load Hand Cursor? Pls Help Me!!!
Hi guys,

I m a newbie to this forum. I m juz wondering if therez anyone who can advice on loading the hand cursor when opinter is over a control in the vb form (the one that mouse over a hyperlinks).

Many thanks in advance!!

Windows Hand Cursor / Icon
I had been searching for the famous hand cursor / icon that shows up in windows whenever there is a hyperlink etc... I found several other icons on the internet but not the windows hand cursor / icon. In the end I finally found it. I have attached it to this post for others to use.

Tooltip, Hand Cursor In Rich Text Box
Good day,

Using a rich text box, I select certain words that I recolor to blue and underline, to give the "hyperlink" appearance. A sample text might appear as follows:

Last week, Smith taught Jones how to program in VB6.

Now for the highlighted text, I would like to add a custom tooltip and a custom cursor (I'm using hand.ico). The problem is that the .tooltiptext and .mouseicon properties of the rich text box apply to the whole box, whereas I only want to fire the tooltip and hand cursor when the mouse hovers over the selected text.

One more problem: The text string is being fed in by the application, so I do not want the user to be able to edit it. But when you set the .enabled property of the rich text box to 'false', tooltips and custom cursors also get disabled.

As always, thanks for any help you can provide.

Putting Hand Mouse Cursor Over Picture
I would like it when the user places their mouse cursor over a picture, that it changes to the HAND cursor, but I see VB6 doesn't seem to have an option for this cursor.

I then tried setting the cursor to 4 - Icon, and I chose one of the .cur files in the windows folder, and still it does not show the cursor...

How can I make the mouse appear as a hand over a picture in my form?

Changing A Cursor To A Hand In Excel 2003
I was referenced to go to the string
thread181-775804: Change the mouse cursor to a pointer

and it explains for access but not excel. I am not well educated in excel. I have a checkbox that I would like to have the cursor change when it is floating over the checkbox.

currently I have this
Private Sub CheckBox1_Click()
checkboxstatus = True

End Sub
and I'd like to include the cod ein the string above but do not know how.

thank you -CJ

SQL2005// CRXIr2// XP Pro

"Progress lies not in enhancing what is, but in advancing toward what will be"
-KHALIL GIBRAN 1883-1931

Some Questions: Animated Taskbar Icon, Hand Cursor, Make Text Go To Middle Of Label,
I have 4 pictures that i want the taskbar icon to change through how can i make it animate the 4 different pictures?

How can i make a hand cursor when i goto a certain label then when i move off it go back to the orignal cursor?

With the label box you can center the text but how can you make the text go to the middle of the label box?

When i hover around the top right hand corner of my program it pops up the taskbar icon menu near the top right hand corner of my program i looked at some other programs with taskbar icons and they did the same is there a way to stop this?

My program is an addon for messenger is there any way to make my program exit when they exit messenger? OnAppShutDown?

Thank You

RDO Connection With Sybase (Run-time Error '40088': No Open Cursor Or Cursor Closed
I am having one program in VB 6.0 connecting to sybase when I run stored procedure and assign it to rdorecordset and then if I check rs.eof then it gives me error

Run-time error '40088': No open cursor or cursor closed.

I got one solution for SQL server that it is said that cursor get close automatically on server when used RDO so need to use API to keep it open as follow

Const SQL_PC_ON As Long = 1
Const SQL_PC_OFF As Long = 0
Dim intRet As Integer

intRet = SQLSetConnectOption(cn.hdbc, SQL_PRESERVE_CURSORS, _
This works for SQL can u tell any API or solution to keep cursor open after executing stored procedure

Private wrkODBC As rdoEnvironment
Private conDatabase As rdoConnection

Set conDatabase = objAppLogon.Connect _
(sUserName:=Version_GetUser(), _
sServerName:=sServerName, _
sDatabaseName:=sDatabaseName, _
bManualLogon:=True, _
bUseSecServer:=False, _
bCertifyOnConnect:=False, _
vRDOOptions:=Null, _
bRDOReadOnly:=False, _
sRDOAdditionalConnectString:="", _
rlErrorCode:=lErrorCode _
conDatabase.QueryTimeout = 240

Dim rs As rdoResultset


If rs.EOF = False Then ' This is a line I get error
GetBusinessSectorCode = rs.rdoColumns(0)
GetBusinessSectorCode = -1
End If

Need To Track Text Editer Cursor With Mouse Cursor
Hi All
I am Legally Blind with Macular Degeneration in both eyes and use a dual monitor setup with my App on 1 monitor and use the second monitor as my magnifier XP window. As I scroll my mouse cursor across a line of text, on my magnified window the cursor is stationary in the center of the screen and the text scrolls across the screen with the mouse movement.
I am trying to develop an app that will scroll horizontally over a line of text in any format without any vertical jitter and will give me a line feed and carriage return at the end of the line.
I have written some code that does this, but I cannot figure out how to track the text editing cursor with the mouse cursor. The WinXP Magnifier program I am now using, has this feature and I would like to include it in my app.

Thanks much
Any help will be greatly appreciated


Only Move Cursor If Cursor Movement Is Greater Than X Amount
Ok, here's my problem. In the MouseMove procedure for my picture box, I only want the cursor to actually move if the X or Y value of the cursor's new position is greater than 15 when compared against the cursor's former x or y value.

So in other words, if you just move the mouse a tiny bit to the left, the mouse cursor on your screen will stay still. But if you move it a bit to the left then the mouse cursor on your screen will follow. PLEASE let me know if this is not clear, as I know my problem might not be very clear.

VB6/Blinking Cursor/Textbox/Move Cursor

I would like to always have a blinking cursor in my textbox.

Right now I have a touchscreen with a virual keyboard. All letter commands are sent to the textbox. When I change the properties of the textbox to Arrow (i.e. mouse pointer), the blinking cursor goes away once the virtual keyboard is pressed!

Can someone explain how I can get the blinking cursor to stay at the end of the inputted text?


I would like to create arrow keys. If the user messed up the inputted text, he can move the blinking cursor left one space at a time between inputted characters to add a letter. Then a button to move the blinking cursor back to the end of the inputted text.

Would be grateful for any help and explanations. Thanks.

Which Is Cursor Type Avl For Client Side Cursor
can anybody tell me which are the available types of cursor fot client side

ADO, Cursor Type, Cursor Location
New to ADO. I am struggling to understand the different types of cursors, the amount system resources used for each type, and what kinds of cursor locations can be set.

There are so many terms to memorize and understand it is overwhelming to realize what is meant for the newbie.

Here are three questions that encapsulate the main issues I am having difficulty with. If there is a good website that discusses all of these terms at length, I would appreciate that. I couldn't find exactly what I was looking for at the MSDN site my instructor gave us.

Q1) Which type of cursor uses the least amount of system resources if you wanted to retrieve an ADO recordset which is used to populate a control and then discard the recordset?

Cursor Types to choose from


Q2) If you wanted a client/server app to call a stored procedure that returns multiple large recordsets and you want the app to process all the resulting records sets returned, what Cursor Location and Cursor Type should be set?

Cursor Locations to choose from


Cursor Types to choose from

any type

Q3) If you wanted a client/server app to access only some of the data in a recordset, which type of database cursor should be used in the app to minimize the amount of network traffic?

dynamic server-side cursor
dynamic keyset client-side with pessimistic locking
static client-side cursor with optimistic locking
non-keyset client-side cursor

That Hand....

I'm needing of the explorer "hand" icon to be used with a label (or a similar method to resemble a link). If you know how to do it, or have the .cur, then post it please.


Can I Have A Hand Here??
Hi everyone,

Well I am actually a Flash user at heart and have used ActionScript alot but i need to use visual basic to make this thing for school and i need to know how to do this certain script but the only way i can explain it is in Flash terms, so if someone who knew a bit of flash and vb could give me a hand that would be great.. =)

okay in flash you can write stuff like this:

count = 1
_root["txt" + count] = "Hello"

that would make txt1 which is a text field display "hello"

now how would i do that in vb?? If you need more explanation just ask..


Need A Little Hand Here
ok... well basically im in need of a hand on how i can make a proxy server...

heres what i want to do..

if on another machine on my network goes to download say...

i would like the proxy server to replace the tester.img with a specified file that is on my pc... is this possible

thanks alot if any1 knows

Looking For That HAND Job
Now take your minds out of the gutter.

I want to turn the mousepointer into a "HAND" when I move it over a label on my form (so it acts like a hyperlink).

Non of the vb constants seem to offer that.

Anybody wanna give me a HAND?

Private Sub Label4_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Label4.Item(Index).MousePointer = ????
End Sub

The Hand
I need the hand mouse icon. Anybody how can load it up? I can take it as a jpg file.

Try Your Hand At This One
Within this code at line 56(I flagged it with a + sign)
I get the following error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine does not recognize 'UserRegistration.*' as a valid field name or expression.
/, line 56
UserRegistration.* is my SQL statement that is supposed to query the database UserRegistration.mdb and select the selected fields within the Registration table.
Anybody know what the probem is?

Here is the whole code block:

<!-- #INCLUDE FILE="data.asp" -->
<% Response.Buffer = true %>
'-- Check if Submit button pushed, if not ignore the entire script
If Request.Form("btnAdd") = "Submit" Then

'-- Make sure all boxes have data entered into them
If Request.Form("name") <> "" OR Request.Form("password") <> "" OR _
Request.Form("password2") <> "" OR _
Request.Form("email") <> "" OR _
Request.Form("userID") <> "" Then

'-- Make sure the passwords match
If Request.Form("password") = Request.Form("password2") Then

'-- Declare your variables
Dim DataConnection, cmdDC, RecordSet, SQL, strError
Dim strUserName, strPassword, strEmail, strUserID

'-- Get data from the form fields
strUserName = Request.Form("name")
strPassword = Request.Form("password")
strEmail = Request.Form("email")
strUserID = Request.Form("userID")

'-- Create object and open database
Set DataConnection = Server.CreateObject("ADODB.Connection")
DataConnection.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & DatabasePath & ";"

Set cmdDC = Server.CreateObject("ADODB.Command")
cmdDC.ActiveConnection = DataConnection

'-- default SQL
SQL = "SELECT * FROM UserRegistration"

If Request.Form("name") <> "" Then
SQL = "SELECT UserRegistration.* FROM Register WHERE " & _
"Register.userID='" & strUserID & "' AND " & _
"Register.password ='" & strPassword & _
"' OR ='" & strEmail & "'"
End If

cmdDC.CommandText = SQL
Set RecordSet = Server.CreateObject("ADODB.Recordset")

'-- Cursor Type, Lock Type

'-- ForwardOnly 0 - ReadOnly 1
'-- KeySet 1 - Pessimistic 2
'-- Dynamic 2 - Optimistic 3
'-- Static 3 - BatchOptimistic 4

+Line 56+++++++++ RecordSet.Open cmdDC, , 0, 2

'-- check to see if the user and password or
' e-mail address have registered before
If Not RecordSet.EOF Then
If RecordSet.fields("email")=strEmail Then
strError = "<FONT FACE='ARIAL' SIZE='2'><B>" & _
"Sorry this email has already been " & _
"registered, please try again" & _
'Redo page and say that this User name
'and Password are already taken
strError = "<FONT FACE='ARIAL' SIZE='2'><B>" & _
"Sorry this user name and password are " & _
"already taken, please try again" & _
End If

'-- Add new record to the database
Dim Dconn, sSQL
Set Dconn = Server.CreateObject("ADODB.Connection")
Dconn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & _
DatabasePath & ";"

sSQL = "INSERT INTO Register(name, email, userID, " & _
"password, userLevel) VALUES ('" & strUserName & _
"','" & strEmail & "','" & strUserID & _
"','" & strPassword & "',1)"
Dconn.Execute sSQL
Set Dconn = Nothing

'Forward the user to page to notify of authentication
Response.Redirect "thankyou.asp"
End If
strError = "Your passwords don't match"
End If

'-- Close all connections
Set RecordSet = Nothing

Set DataConnection = Nothing

'Tell them what they entered wrong
strError = "Please fill in all the boxes"
End If
End If


Where&#039;s The Hand, Man?
I wanted my pointer icon to switch to a hand over a picture box in VB6, but there was no option for hand, so it seems I'll have to plug it in as a custom. One problem, I can't find the hand pointer on my system because I don't know the extension for pointers. I'm also wondering if every single Windows machine from 3.x up will have this hand pointer in the same spot or if I'll need to add that hand as part of my deployment package.

Need A Hand...
How would I access more than one table in a database at once using VB's Data Control?

I know I have the option of "looping" through all tables, but this is a simple delete query, and I'd rather not waste time looping if I don't have to.


Mousepointer Hand
I have a label on my form with a link to send an e-mail. Everything works, except that I want the mousepointer to change into the hand when the use goes over the label.

I tried to do that with this code, which I found on this forum:

Public Const HandCursor = 32649&
Public Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As Long
Public Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As Long) As Long

Dim lHandle As Long
lHandle = LoadCursor(0, HandCursor)
If (lHandle > 0) Then SetCursor lHandle
It does not work. If I remove the test on the lHandle, the cursor just disappears.

Can anyone help?

How Do You Set A Hand Icon?
I have created several labels that when clicked will take you to a webpage. I'd like the users icon to change from an arrow to the hand icon (same icon that is present when you pass it over a weblink). I see that you can change the mouse pointer for the label, but when I did Custom and chose my own hand.ico, it didn't quite turn out well (the hand was REALLY huge). Is there code that could emulate this?

Hand Cursors
Hey, anybody could send me a Hand Cursor like when I roll-over a link... can be a simple one, like the IExplore one...

thanx a lot =D

Need Helping Hand
Hello everybody out there,


I am a new guy in this field of programming, i mean in high level programming though i have spent 8 months or so with VB, I got adequate knowledge of application development and other small size of project (Database related), now I want to be real vb programmer in the sense that I want to get perfect in all field of visual basic provides e.g. API, winsock, COM, DCOM and high level programming, so please help me to get rid of that, what should be done in order to get expertise in all these things.

If any body has tutorials that can be mailed to this is most welcome or you can recommend me which books and online tutorials can help me to get rid of those things. Any other suggestions also welcome, like how much time one should spent, any special technique that can be help full.

Thanking you in Advance,


Need A Hand With Checkboxes...
Hi all.

Ive got a form which has five checkboxes named 'chk1', 'chk2', 'chk3' etc etc.

I start by making all 5 checkboxes visible = false, and then Ive got a public variable called 'strElement' which tells me how many checkboxes i need to make visible. I dont seem to be able to reference the checkbox.

Can anyone help?

For strElement = 1 To strElement
strCheck = "chk" & strElement
With strCheck
.Visible = True
End With
Next strElement

The Hand Is Now Palming (LOL)
Thought I would just make a quick announcement that my company recently purchased the AppForge software, so over the next few months I will be assimilating as much Palm/PocketPC knowledge as I can. As such, I hope that this board will start receiving more traffic and interest.

AppForge is a terrific product, and very worth the money as it saves countless hours in development. I am nothing but pleased.

Can Anyone Give Me A Hand With This ?
I'm working on a Control that accepts a form, paints it into a picturebox and if the form dimensions are larger than the picturebox are, there are scrollbars which will allow the user to scroll the form.
I had originally I had tried to create my own scrollbars because I wanted to be able to color them exactly how IE colors scrollbars, but that was way over my head . Anyhow I'm struggling a bit at getting this working correctly, if one of you could take a quick look and maybe try to fix it, it would be greatly appreciated. I've attached the control.

oh also when the usercontrol is resized the scrollbars should be recalculated of course

Moving Hand
Can anyone show my mate how to create a program that acts as a second and on a clock.

It moves round every second ad within 60 seconds it as completed a full circle (360degrees)

Tomorrow Hand In!
I already finnished my aplication for my final thesis and i would like to post the last thread in this forum to say THANK YOU to everybody that gave me a hand when i had a problem. Without this forum i would be completly lost!!!!!
So... see you another time!


Question For The Hand
I am trying to use the code I received from you for reports and I have a question on part of the code that contains the string of data to pass into Word. I would like to know how to modify the following function to pass the data that is located on my VB form instead of this string of data (When the form runs, data could come from an Oracle database or the user could type it on the form). Basically whatever is on the form I would like to send to this screen.

RunWordReport App.Path & "ExampleDoc.doc", "doTest", "StartDate=5/02/2002|EndDate=06-04-2002|DBPath=Nothing at this time(oracle)"

Thank you

Need A Hand With Count
hi folks, i've been fooling around with a select clause containing a count and i'm not able to get what i want. here what my table looks like

NoSoumission, noRevision, clientID.... &lt;-- where NoSoumission, noRevision are primary key

now what i want is to know how many distinct soumissions each client did. a bit like this

clientID, qty

for the moment i'm only able to get something like this
clientID, qty

can someone help out

Hand Icon For VB6?
Anyone have a link to download a hand icon. So when you put your cursor over something it turns into the clickable hand?

Whats In The Hand?
Im writing a program that deals with poker, the person has 10 combo boxes and tells me the value and suit of their cards, then I want to say if they have a royal flush, straight flush, four of a kind, etc. The problem is I can't compare an Ace to a 7 to test which is bigger. Whats my best option here?

Quick Hand

I am currently working on a very simple program, which when opened, has a timer set to 4 minutes. Once the 4 minutes has counted down, a message appears saying that the time is up.

Also a reset button is needed, so the 4 minutes can be reset and started again.

I am new to programming, so any help would be greatly appreciated.


Need A Hand With XML, Please [RSLVD]
Allright this is an easy one for all who have worked much with XML. I understand the structure, I think.. but I'm having issues with the syntax. I tried sniffing around this forum with no luck. The examples don't have what I'm looking for, are too complex, or I am generaly blind.

I have a file such as this one called Commands.xml

<NAME Tag="Max">That is me</NAME>

All I want to do, is create a domDocument (done) and read the first element.. which is COMMAND. After that, I want to cycle through all the children of COMMAND incase there are more NAME elements.

My code:

'This is a type I have created
Private Type xmlCommandTree

docFile As New DOMDocument30
docParent As IXMLDOMElement
docCommand As IXMLDOMElement
docName As IXMLDOMElement

End Type
'Actuall function

Dim xCommand As xmlCommandTree
With xCommand

.docFile.Load "commands.xml"
Set .docCommand = .docFile.firstChild
Set .docParent = .docCommand.firstChild

'Here I would put in a loop that cycles through all the children
'However, when I run this piece of code it sais:
'Object variable or With Block not set - Whats that mean?

End With

Can someone give me a hand before all my hair turns gray.

Can Someone Give Me A Hand
hi all

could someone help me out with a problem im having with my form.

im creating an associative question form so my user will type in words they associate with my 12 keywords and submit them. These words will then save in a text file. My form then picks 3 random keywords and the user types in the same associative words that they previously entered.

However when i click on submit entering the correct associative words my message box says false. could someone please help me with where i've gone wrong so that my message box says correct when the correct words are entered and false when the incorrect words are entered.

i've hopefully attaced my form correctly to this post

any help would be great


Anyone Have Any Application On Hand
hi, do anyone have any application on hand that uses Oracle database.....

the application that have add, update and delete features...and is connected to the Oracle database, i need it....

i want to compare the differences between MS Access and Oracle Database

pls, if u wish to share it...

Ah Xing....

Error Hand
I want to have a single error hand for the whole application
there are about 6 to 7 forms in it

any error accurres , i want to type the information into a log file and should unload the the current form

where should i write the code

my applications loads form sub main()

Please hepl urgent

May Y Plz Give Hand

i tried data report control but it seems to me itsnt quite sufficient

here is i need some one tell - can i connect crystal report ver8.5 to sqlserver2000


Copyright 2005-08, All rights reserved