![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jun 2008
Posts: 3
Rep Power: 0
![]() |
Hi
I am using VB 2005 Express Edition. I have to create a form by using graphics objects. For example i want to draw something using pen object, how do i draw by using keyboard keys w/o using the mouse? ![]() |
|
|
|
|
|
#2 |
|
Programmer
|
Re: How do i stimulate keyboard events?
I at first thought you where trying to make somekind of keylogger by the question LOL ,,,,, most common is to use the Directional arrow keys or to designate specific keys to do use ( some call them Hot Keys ) Like hold Ctrl + A to do one thing and so on with other keys hope that helps you a bit
|
|
|
|
|
|
#3 | |
|
Newbie
Join Date: Jun 2008
Posts: 3
Rep Power: 0
![]() |
Quote:
Before i designate the keys, I must set the the cursor's position first. For example, i created a cursor for the Current cursor's Hanlde, changes its position and clipping rectangle. I tried out the code, but there are several errors and warnings. Any help? 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![]() |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |
| How to handle keyboard events in an app containing ActiveX Controls ? | George Giolfan | Visual Basic .NET | 0 | Aug 7th, 2005 3:07 AM |
| keyboard: switching scripts | EverLearning | Coder's Corner Lounge | 5 | Jul 22nd, 2005 8:04 PM |
| Interfacing with a Keyboard | brkstf | Assembly | 7 | Mar 21st, 2005 3:48 PM |
| How do I direct stdout to the screen, stdin to the keyboard? | fzrrider | C++ | 0 | Feb 13th, 2005 5:33 PM |