Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 10th, 2008, 1:57 AM   #1
ashura517
Newbie
 
Join Date: Jun 2008
Posts: 3
Rep Power: 0 ashura517 is on a distinguished road
Exclamation How to get the cursor moving using keyboard keys?

Hi
I'm using VB 2005 Express Edition. I must set the the cursor's position. For example, i created a cursor for the Current cursor's Handle, changes its position and clipping rectangle. I tried out the code, but there are several errors and warnings. Any help?

Public Shared Property Position As Point
Public Class Form1
    Dim value As Point
    value = Cursor.Position
    Cursor.Position = value

    Private Sub MoveCursor()
        ' If the form's cursor is not the Default cursor,
        ' set the Current cursor, move the cursor's Position,
        ' and set its clipping rectangle to the form. 
        If Not Me.Cursor.Equals(Cursors.Default) Then
            Me.Cursor = New Cursor(Cursor.Current.Handle)
            Cursor.Position = New Point(Cursor.Position.X - 50, Cursor.Position.Y - 50)
            Cursor.Clip = New Rectangle(Me.Location, Me.Size)
        End If
    End Sub
End Class

The namespace is System.Windows.Forms.
ashura517 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCV Help Needed: Can't use the keyboard while running cvcamSetPropetry Phanixis C++ 3 May 15th, 2007 3:04 PM
Removing 'run' registry keys? Prm753 C 9 Jan 28th, 2007 3:35 PM
keyboard: switching scripts EverLearning Coder's Corner Lounge 5 Jul 22nd, 2005 8:04 PM
Keyboard guide needed Aphex_Twin C++ 3 May 21st, 2005 12:13 PM
Interfacing with a Keyboard brkstf Assembly 7 Mar 21st, 2005 3:48 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:32 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC