OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-12-2005, 11:08
xombie
Guest
 
Posts: n/a
Question How to Check for two keys pressed at the same time

Hi all,
Knowing that:-
Code:
Private Const VK_SHIFT = &H10
Private Const VK_CONTROL = &H11
and
Code:
Public Function IsShiftPressed() As Boolean
    IsShiftPressed = (GetAsyncKeyState(VK_SHIFT) < 0)
End Function
Public Function IsCtrlPressed() As Boolean
    IsCtrlPressed = (GetAsyncKeyState(VK_CONTROL) < 0)
End Function
with
Code:
if IsShiftPressed() Then someAction
if IsShiftCtrl() Then someAction
...will determin the condition of each individual key state.
How are they put together to determin if both shift & control are pressed at the same time????
Reply With Quote
  #2  
Old 08-12-2005, 13:35
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default

umm,

Code:
If IsShiftPressed() And IsCtrlPressed() Then someAction
Reply With Quote
  #3  
Old 09-12-2005, 09:29
xombie
Guest
 
Posts: n/a
Red face Thanx Alex

I tried using amphersand and + I have never had to use the and key word. Thanx again
Reply With Quote
Reply


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


All times are GMT -5. The time now is 00:38.


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