bb.donnay-software.com

Donnay Software Web Forums
It is currently Tue Jul 14, 2020 10:22 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: GetAsyncKeyState
PostPosted: Wed Nov 07, 2018 10:41 am 
Offline
User avatar

Joined: Thu Feb 11, 2010 1:39 pm
Posts: 490
Hi all

Any one with the idea on how to use GetAsyncKeyState API to determine the rbClick on any part of an ActiveX dialog box for contextmenu popup.

Thanks

Joe


Top
 Profile  
 
 Post subject: Re: GetAsyncKeyState
PostPosted: Wed Nov 07, 2018 1:29 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4140
Location: Boise, Idaho USA
You can probably use the GetCursorPos API call.

You will need to use Alaska's Binary Access Package (see docs) to work with the POINT structure.

GetCursorPos function
09/25/2018
2 minutes to read
Retrieves the position of the mouse cursor, in screen coordinates.

Syntax

Copy
BOOL GetCursorPos(
LPPOINT lpPoint
);
Parameters
lpPoint

Type: LPPOINT

A pointer to a POINT structure that receives the screen coordinates of the cursor.

Return Value
Type: BOOL

Returns nonzero if successful or zero otherwise. To get extended error information, call GetLastError.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
 Post subject: Re: GetAsyncKeyState
PostPosted: Wed Nov 07, 2018 2:57 pm 
Offline
User avatar

Joined: Wed Feb 24, 2010 3:44 pm
Posts: 1185
unixkd wrote:
Any one with the idea on how to use GetAsyncKeyState API to determine the rbClick on any part of an ActiveX dialog box for contextmenu popup.
can you give a Sample what you want to do with GetAsyncKeyState :?:
https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getasynckeystate

_________________
greetings by OHR
Jimmy


Top
 Profile  
 
 Post subject: Re: GetAsyncKeyState
PostPosted: Thu Nov 08, 2018 1:04 pm 
Offline

Joined: Tue Aug 31, 2010 9:01 pm
Posts: 120
Hi

That way you can make your call

#INCLUDE "ot4xb.ch"
#INCLUDE "dll.ch"

Local i, key, cResponse

For i = 0 To 255
// We consult the value of the key by means of the Api. _
//If pressed returns -32767 and we show the value of i

// 'Consultamos el valor de la tecla mediante el Api. _
// Si se presionó devuelve -32767 y mostramos el valor de i

If @user32:GetAsyncKeyState(i) = -32767 // or DllCall("USER32.DLL",DLL_STDCALL, "GetAsyncKeyState" ,y )

MsgBox() //Virtual key code :" i , " The key pressed is : " Chr(i)
// "Código de la tecla virtual :" i ," La Tecla presionada es : " Chr(i)

End If
sleep(50) //use Timer1:Interval
Next
Endif


Best Regard
Héctor Pezoa


Top
 Profile  
 
 Post subject: Re: GetAsyncKeyState
PostPosted: Wed Nov 14, 2018 8:16 am 
Offline
User avatar

Joined: Thu Feb 11, 2010 1:39 pm
Posts: 490
Hi Hector

Code:
DllCall("USER32.DLL",DLL_STDCALL, "GetAsyncKeyState" ,y )


What if the parameter y in your API called in the above code ?

Thanks

Joe


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group