|
-
Jul 22nd, 2003, 01:53 PM
#1
Thread Starter
Hyperactive Member
Changing the mouse pointer
Hello VB.net users,
I tried to change the mouse pointer in vb.net. Can someone show me a source how to do this.
Nice regards,
Michelle.
-
Jul 22nd, 2003, 02:16 PM
#2
Hyperactive Member
Me.Cursor = Cursors. - choose your cursor shape
-
Jul 23rd, 2003, 03:08 PM
#3
Thread Starter
Hyperactive Member
What do I wrong??
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Cursor = 1
End Sub
End Class
-
Jul 23rd, 2003, 03:50 PM
#4
Hyperactive Member
Cursor 1 will not work, it will not compile if you just put a one there. Try putting the name like default or ibeam. also do you have anything like a text box that could change the cursor, I think you may have to change it's cursor proporties also.
-
Jul 23rd, 2003, 03:50 PM
#5
Frenzied Member
-
Jul 24th, 2003, 01:28 AM
#6
Thread Starter
Hyperactive Member
Thanks all for the information.
Michelle.
-
Jul 24th, 2003, 03:13 AM
#7
Just in case anybody doesn't already know this...
If you change the cursor you should always use a Try-Catch-Finally structure so that if something goes wrong the cursor isn't left looking like an hour-glass for evermore.
VB Code:
Try
Cursor.Current = Cursors.WaitCursor
TreeView1.BeginUpdate()
'Write code here to add items to treeview.
Catch ex As Exception
Debug.WriteLine(ex.Message)
Finally
TreeView1.EndUpdate()
Cursor.Current = Cursors.Default
End Try
This world is not my home. I'm just passing through.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|