OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 02-11-2006, 01:06
Posts: n/a
Default GetUserClick

I would like a bit of help with "GetUserClick".

It is working fine for me, but I'd like to augment the functionality.

In the example code, there is some code like this.....

If (Shift And 1) <> 0 Then cr = 255 ' Shift depressed - Add Red
If (Shift And 2) <> 0 Then cg = 255 ' Ctrl depressed - Add Green
If (Shift And 4) <> 0 Then cb = 255 ' Alt depressed - Add Blue
s.Fill.UniformColor.RGBAssign cr, cg, cb

Is there a way of using another key other than Shift, Alt,and Cntrl? What I would to do is when I click, I would like the object I create to be rotated - say while holding the "L" key done, the object is rotated left, the "R" key would rotate the object right.

Also, when the "snap" property is set to true, would there be a way of determining the data (name) property of the the object it is snapping to? What I would like to do is, when I click and the new object is snapping to an object called "Track 1", I would like to be able to asign that name to the new object.

Thanks in advance!

Reply With Quote
Old 02-11-2006, 07:36
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4

You need to use GetAsyncKeyState Windows API function for that. There are a few posts on using it here:


Here is the description of this function in MSDN:


And here is the list of virtual key codes that this function can use:

Reply With Quote
Old 09-11-2006, 01:03
Posts: n/a

Thanks Alex - works perfectly!
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
GetUserClick? ssskurt CorelDRAW CS 0 23-12-2002 11:46

All times are GMT -5. The time now is 12:33.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com