Mike,

TO Trap for the CONTROL KEY or SHIFT KEY

Put the following in your forms OnAfterStart EEP:

{begin code}

IF (chkfunc('GetKeyState')) = 0 THEN
 {Note:  A Return Value > 1 means the Key is DOWN}
 STDCALL function 'GetKeyState' (integer) : integer
ENDIF

{end code}

Then in any EEP where you want to check the status of a SHIFT key or CONTROL key put the following:
{begin code}
SET VAR vi INTEGER = NULL
SET VAR vk_control = 17
SET VAR vk_shift = 10

{ the following test for CONTROL.  To test for SHIFT
 change the variable passed to vk_shift in the DLCALL function }
SET VAR vi = (dlcall('User32', 'GetKeyState', vk_control))
TRACE
IF vi  > 1 THEN
 PAUSE 2 USING 'Control Key is Down'
ENDIF
{end code}


A note to this. the GetKeyState returns a SHORT value and RBASE has only Integer, so usually the return value for the KeyDown state would be a negative number, -127 or -128, but RBase Integer is a positive value of 65409 or 65408 (depending on whether the L or R key was pressed) which is the wrap up from the end of the signed negative value AFAICT.....

----- Original Message ----- From: "MikeB" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Monday, March 30, 2009 12:42 PM
Subject: [RBASE-L] - Re: Can Rbase distinguish between a mouse click and a [CTRL] mouse click?


Your way is fine. Later I will see if I can use API GetKeyState to capture if the CTRL key is pressed in the RightClick EEP. I'll Let you know.



----- Original Message ----- From: "Michael J. Sinclair, MD" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Monday, March 30, 2009 12:36 AM
Subject: [RBASE-L] - Re: Can Rbase distinguish between a mouse click and a [CTRL] mouse click?



I do have a work around, but perhaps there is a better one. I have bunch on Variable Images on a form. I would like to be able to use a CTRL-Mouse Click to pick and choose which ones to highlight, and then after they are highligted, perform some action, ie print, fax, delete, etc. My work around has been to place a 3d box behind each, and use the property command to change the color of the 3d box with a right click. I can then use the getproperty command to see which have been highlighted and then do my task. Not quite as nice as using a CTRL-CLICK, to highlight things (as is common in Windows), but it works.
How would you do it?
Mike

-------------- Original message from "MikeB" <[email protected]>: --------------


No. Only in the Designer. Actually, at runtime, a CTRL[Click] wouldn't be
an event anyway.  It's just a STATE of a control, Selected/unSelected.

Why don't you define exactly what you are trying to acheive, then an answer
can be formulated if possible.

----- Original Message ----- From: "Michael J. Sinclair, MD"
To: "RBASE-L Mailing List"
Sent: Sunday, March 29, 2009 7:46 PM
Subject: [RBASE-L] - Re: Can Rbase distinguish between a mouse click and a
[CTRL] mouse click?


>
> Hi Mike,
> I may be a little slow...are you saying we can make a form respond to > a
> [CTRL]mouse click when the form is running? I don't see that option
> anywhere in the list of options when adding EEPS. I can see where I > have > those options when I am designing a form, but I don't see any way to > give
> those options to the user of my applications.
> Mike
>
>  -------------- Original message from "MikeB"
> : --------------
>
>
>> Mike,
>>
>>   In the form designer, it is SHIFT[Click] to add additional controls
>> highlighted state. CTRL[MouseDown] "RubberBands" or "Lassos" a >> group
>> of
>> controls highlighted state.
>>
>> ----- Original Message ----- >> From: "Michael J. Sinclair, MD"
>> To: "RBASE-L Mailing List"
>> Sent: Sunday, March 29, 2009 4:30 PM
>> Subject: [RBASE-L] - Can Rbase distinguish between a mouse click and >> a
>> [CTRL] mouse click?
>>
>>
>> > Hi All,
>> > Is there any way that Rbase can tell if the user has peformed a >> > mouse >> > click vs a [CTRL] mouse click? It would be cool if I could mimic >> > the
>> > windows [CTRL] mouse click to do things like highlight  a series of
>> > controls (using the getproperty and property commands---my new best
>> > friends!)
>> >
>> > Mike
>> >
>>
>>
>>
--------------------------------------------------------------------------------
>>
>>
>> Hi All,
>>
>> Is there any way that Rbase can tell if the user has peformed a mouse
>> click
>> vs a [CTRL] mouse click? It would be cool if I could mimic the >> windows
>> [CTRL] mouse click to do things like highlight  a series of controls
>> (using
>> the getproperty and property commands---my new best friends!)
>>
>>
>>
>> Mike
>>
>>
>


--------------------------------------------------------------------------------


Hi Mike,
I  may be a little slow...are you saying we can make a form respond to a
[CTRL]mouse click when the form is running? I don't see that option anywhere
in the list of options when adding EEPS. I can see where I have those
options when I am designing a form, but I don't see any way to give those
options to the user of my applications.
Mike


  -------------- Original message from "MikeB"
: --------------

  > Mike,
  >
  > In the form designer, it is SHIFT[Click] to add additional controls
> highlighted state. CTRL[MouseDown] "RubberBands" or "Lassos" a group of
  > controls highlighted state.
  >
> ----- Original Message ----- > From: "Michael J. Sinclair, MD"
  > To: "RBASE-L Mailing List"
  > Sent: Sunday, March 29, 2009 4:30 PM
> Subject: [RBASE-L] - Can Rbase distinguish between a mouse click and a
  > [CTRL] mouse click?
  >
  >
  > > Hi All,
> > Is there any way that Rbase can tell if the user has peformed a mouse > > click vs a [CTRL] mouse click? It would be cool if I could mimic the
  > > windows [CTRL] mouse click to do things like highlight a series of
> > controls (using the getproperty and property commands---my new best
  > > friends!)
  > >
  > > Mike
  > >
  >
  >
  >
--------------------------------------------------------------------------------
  >
  >
  > Hi All,
  >
> Is there any way that Rbase can tell if the user has peformed a mouse
click
> vs a [CTRL] mouse click? It would be cool if I could mimic the windows
  > [CTRL] mouse click to do things like highlight a series of controls
(using
  > the getproperty and property commands---my new best friends!)
  >
  >
  >
  > Mike
  >
  >





--------------------------------------------------------------------------------


I do have a work around, but perhaps there is a better one. I have bunch on Variable Images on a form. I would like to be able to use a CTRL-Mouse Click to pick and choose which ones to highlight, and then after they are highligted, perform some action, ie print, fax, delete, etc. My work around has been to place a 3d box behind each, and use the property command to change the color of the 3d box with a right click. I can then use the getproperty command to see which have been highlighted and then do my task. Not quite as nice as using a CTRL-CLICK, to highlight things (as is common in Windows), but it works.
How would you do it?
Mike


-------------- Original message from "MikeB" <[email protected]>: --------------

> No. Only in the Designer. Actually, at runtime, a CTRL[Click] wouldn't be
 > an event anyway. It's just a STATE of a control, Selected/unSelected.
 >
> Why don't you define exactly what you are trying to acheive, then an answer
 > can be formulated if possible.
 >
> ----- Original Message ----- > From: "Michael J. Sinclair, MD"
 > To: "RBASE-L Mailing List"
 > Sent: Sunday, March 29, 2009 7:46 PM
> Subject: [RBASE-L] - Re: Can Rbase distinguish between a mouse click and a
 > [CTRL] mouse click?
 >
 >
 > >
 > > Hi Mike,
> > I may be a little slow...are you saying we can make a form respond to a
 > > [CTRL]mouse click when the form is running? I don't see that option
> > anywhere in the list of options when adding EEPS. I can see where I have > > those options when I am designing a form, but I don't see any way to give
 > > those options to the user of my applications.
 > > Mike
 > >
 > > -------------- Original message from "MikeB"
> > : -------------- > >
 > >
 > >> Mike,
 > >>
 > >> In the form designer, it is SHIFT[Click] to add additional controls
 > >> highlighted state. CTRL[MouseDown] "RubberBands" or "Lassos" a group
 > >> of
 > >> controls highlighted state.
 > >>
> >> ----- Original Message ----- > >> From: "Michael J. Sinclair, MD"
 > >> To: "RBASE-L Mailing List"
 > >> Sent: Sunday, March 29, 2009 4:30 PM
> >> Subject: [RBASE-L] - Can Rbase distinguish between a mouse click and a
 > >> [CTRL] mouse click?
 > >>
 > >>
 > >> > Hi All,
> >> > Is there any way that Rbase can tell if the user has peformed a mouse > >> > click vs a [CTRL] mouse click? It would be cool if I could mimic the
 > >> > windows [CTRL] mouse click to do things like highlight a series of
> >> > controls (using the getproperty and property commands---my new best
 > >> > friends!)
 > >> >
 > >> > Mike
 > >> >
 > >>
 > >>
 > >>
 > 
--------------------------------------------------------------------------------
 > >>
 > >>
 > >> Hi All,
 > >>
> >> Is there any way that Rbase can tell if the user has peformed a mouse
 > >> click
> >> vs a [CTRL] mouse click? It would be cool if I could mimic the windows
 > >> [CTRL] mouse click to do things like highlight a series of controls
 > >> (using
 > >> the getproperty and property commands---my new best friends!)
 > >>
 > >>
 > >>
 > >> Mike
 > >>
 > >>
 > >
 >
 >
 > 
--------------------------------------------------------------------------------
 >
 >
 > Hi Mike,
 > I may be a little slow...are you saying we can make a form respond to a
> [CTRL]mouse click when the form is running? I don't see that option anywhere
 > in the list of options when adding EEPS. I can see where I have those
> options when I am designing a form, but I don't see any way to give those
 > options to the user of my applications.
 > Mike
 >
 >
 > -------------- Original message from "MikeB"
> : -------------- >
 >
 > > Mike,
 > >
 > > In the form designer, it is SHIFT[Click] to add additional controls
> > highlighted state. CTRL[MouseDown] "RubberBands" or "Lassos" a group of
 > > controls highlighted state.
 > >
> > ----- Original Message ----- > > From: "Michael J. Sinclair, MD"
 > > To: "RBASE-L Mailing List"
 > > Sent: Sunday, March 29, 2009 4:30 PM
> > Subject: [RBASE-L] - Can Rbase distinguish between a mouse click and a
 > > [CTRL] mouse click?
 > >
 > >
 > > > Hi All,
> > > Is there any way that Rbase can tell if the user has peformed a mouse > > > click vs a [CTRL] mouse click? It would be cool if I could mimic the
 > > > windows [CTRL] mouse click to do things like highlight a series of
 > > > controls (using the getproperty and property commands---my new best
 > > > friends!)
 > > >
 > > > Mike
 > > >
 > >
 > >
 > >
 > 
--------------------------------------------------------------------------------
 > >
 > >
 > > Hi All,
 > >
 > > Is there any way that Rbase can tell if the user has peformed a mouse
 > click
> > vs a [CTRL] mouse click? It would be cool if I could mimic the windows
 > > [CTRL] mouse click to do things like highlight a series of controls
 > (using
 > > the getproperty and property commands---my new best friends!)
 > >
 > >
 > >
 > > Mike
 > >
 > >
 >
 >



Reply via email to