Hi all
Does anybody know if it is possible to detect whether a modifier key (i.e. CTRL, ALT or SHIFT) was down when the mouse was clicked? I believe it's possible in some languages/frameworks but not in VFP. Would I be correct or is there some way of doing this?
Many thanks
Paul Newton
Maybe trapping something in the MouseUp event? It seems like it does capture that info.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul Newton Sent: Wednesday, September 11, 2019 9:11 AM To: profoxtech@leafe.com Subject: Detecting mouse click with modifier
Hi all
Does anybody know if it is possible to detect whether a modifier key (i.e. CTRL, ALT or SHIFT) was down when the mouse was clicked? I believe it's possible in some languages/frameworks but not in VFP. Would I be correct or is there some way of doing this?
Many thanks
Paul Newton
Putting this in the MouseUp event of a textbox shows all the values captured:
WAIT WINDOW TRANSFORM(nButton)+[ - ]+TRANSFORM(nShift)+[ - ]+TRANSFORM(nXCoord)+[ - ]+TRANSFORM(nYCoord)
The only combination that didn't seem to return anything was all 3 modifier keys pressed. Hopefully you're not looking to trap CTRL-ALT-SHIFT.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Richard Kaye Sent: Wednesday, September 11, 2019 9:30 AM To: profoxtech@leafe.com Subject: RE: Detecting mouse click with modifier
Maybe trapping something in the MouseUp event? It seems like it does capture that info.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul Newton Sent: Wednesday, September 11, 2019 9:11 AM To: profoxtech@leafe.com Subject: Detecting mouse click with modifier
Hi all
Does anybody know if it is possible to detect whether a modifier key (i.e. CTRL, ALT or SHIFT) was down when the mouse was clicked? I believe it's possible in some languages/frameworks but not in VFP. Would I be correct or is there some way of doing this?
Many thanks
Paul Newton
[excessive quoting removed by server]
Thanks Richard - I'll take a look at that Paul
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Richard Kaye Sent: 11 September 2019 14:34 To: profoxtech@leafe.com Subject: RE: Detecting mouse click with modifier
Sent by an external sender ------------------------------
Putting this in the MouseUp event of a textbox shows all the values captured:
WAIT WINDOW TRANSFORM(nButton)+[ - ]+TRANSFORM(nShift)+[ - ]+TRANSFORM(nXCoord)+[ - ]+TRANSFORM(nYCoord)
The only combination that didn't seem to return anything was all 3 modifier keys pressed. Hopefully you're not looking to trap CTRL-ALT-SHIFT.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Richard Kaye Sent: Wednesday, September 11, 2019 9:30 AM To: profoxtech@leafe.com Subject: RE: Detecting mouse click with modifier
Maybe trapping something in the MouseUp event? It seems like it does capture that info.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul Newton Sent: Wednesday, September 11, 2019 9:11 AM To: profoxtech@leafe.com Subject: Detecting mouse click with modifier
Hi all
Does anybody know if it is possible to detect whether a modifier key (i.e. CTRL, ALT or SHIFT) was down when the mouse was clicked? I believe it's possible in some languages/frameworks but not in VFP. Would I be correct or is there some way of doing this?
Many thanks
Paul Newton
[excessive quoting removed by server]
Hi Richard Worked a treat when used on a command button. Many thanks Paul
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Richard Kaye Sent: 11 September 2019 14:34 To: profoxtech@leafe.com Subject: RE: Detecting mouse click with modifier
Sent by an external sender ------------------------------
Putting this in the MouseUp event of a textbox shows all the values captured:
WAIT WINDOW TRANSFORM(nButton)+[ - ]+TRANSFORM(nShift)+[ - ]+TRANSFORM(nXCoord)+[ - ]+TRANSFORM(nYCoord)
The only combination that didn't seem to return anything was all 3 modifier keys pressed. Hopefully you're not looking to trap CTRL-ALT-SHIFT.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Richard Kaye Sent: Wednesday, September 11, 2019 9:30 AM To: profoxtech@leafe.com Subject: RE: Detecting mouse click with modifier
Maybe trapping something in the MouseUp event? It seems like it does capture that info.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul Newton Sent: Wednesday, September 11, 2019 9:11 AM To: profoxtech@leafe.com Subject: Detecting mouse click with modifier
Hi all
Does anybody know if it is possible to detect whether a modifier key (i.e. CTRL, ALT or SHIFT) was down when the mouse was clicked? I believe it's possible in some languages/frameworks but not in VFP. Would I be correct or is there some way of doing this?
Many thanks
Paul Newton
[excessive quoting removed by server]
nKeys is set in the MouseDown() event and captures Ctrl, Alt, Shift and combinations of them:
https://www.tedroche.com/hackfox7/s4g378.html
On Wed, Sep 11, 2019 at 9:29 AM Richard Kaye rkaye@invaluable.com wrote:
Maybe trapping something in the MouseUp event? It seems like it does capture that info.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul Newton Sent: Wednesday, September 11, 2019 9:11 AM To: profoxtech@leafe.com Subject: Detecting mouse click with modifier
Hi all
Does anybody know if it is possible to detect whether a modifier key (i.e. CTRL, ALT or SHIFT) was down when the mouse was clicked? I believe it's possible in some languages/frameworks but not in VFP. Would I be correct or is there some way of doing this?
Many thanks
Paul Newton
[excessive quoting removed by server]
Thanks Ted I hadn't come across OUTSHOW before ! Paul
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Ted Roche Sent: 11 September 2019 20:08 To: profoxtech@leafe.com Cc: profoxtech@leafe.com Subject: Re: Detecting mouse click with modifier
Sent by an external sender ------------------------------
nKeys is set in the MouseDown() event and captures Ctrl, Alt, Shift and combinations of them:
https://www.tedroche.com/hackfox7/s4g378.html
On Wed, Sep 11, 2019 at 9:29 AM Richard Kaye rkaye@invaluable.com wrote:
Maybe trapping something in the MouseUp event? It seems like it does capture that info.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Paul Newton Sent: Wednesday, September 11, 2019 9:11 AM To: profoxtech@leafe.com Subject: Detecting mouse click with modifier
Hi all
Does anybody know if it is possible to detect whether a modifier key (i.e. CTRL, ALT or SHIFT) was down when the mouse was clicked? I believe it's possible in some languages/frameworks but not in VFP. Would I be correct or is there some way of doing this?
Many thanks
Paul Newton
[excessive quoting removed by server]
Hi Paul,
You will need to save the value of nShift in the MouseDown event, then reference it in the Click event.
HTH, Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Wednesday, September 11, 2019 9:11 AM To: profoxtech@leafe.com Subject: Detecting mouse click with modifier
Hi all
Does anybody know if it is possible to detect whether a modifier key (i.e. CTRL, ALT or SHIFT) was down when the mouse was clicked? I believe it's possible in some languages/frameworks but not in VFP. Would I be correct or is there some way of doing this?
Many thanks
Paul Newton
[excessive quoting removed by server]
Thanks Tracy - I'll try that Paul
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Tracy Pearson Sent: 11 September 2019 14:30 To: profoxtech@leafe.com Subject: RE: Detecting mouse click with modifier
Sent by an external sender ------------------------------
Hi Paul,
You will need to save the value of nShift in the MouseDown event, then reference it in the Click event.
HTH, Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Wednesday, September 11, 2019 9:11 AM To: profoxtech@leafe.com Subject: Detecting mouse click with modifier
Hi all
Does anybody know if it is possible to detect whether a modifier key (i.e. CTRL, ALT or SHIFT) was down when the mouse was clicked? I believe it's possible in some languages/frameworks but not in VFP. Would I be correct or is there some way of doing this?
Many thanks
Paul Newton
[excessive quoting removed by server]
Hi Tracy No need to save the value of nShift in the MouseDown - Just check it in MouseUp as Richard suggested. Paul
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Tracy Pearson Sent: 11 September 2019 14:30 To: profoxtech@leafe.com Subject: RE: Detecting mouse click with modifier
Sent by an external sender ------------------------------
Hi Paul,
You will need to save the value of nShift in the MouseDown event, then reference it in the Click event.
HTH, Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Wednesday, September 11, 2019 9:11 AM To: profoxtech@leafe.com Subject: Detecting mouse click with modifier
Hi all
Does anybody know if it is possible to detect whether a modifier key (i.e. CTRL, ALT or SHIFT) was down when the mouse was clicked? I believe it's possible in some languages/frameworks but not in VFP. Would I be correct or is there some way of doing this?
Many thanks
Paul Newton
[excessive quoting removed by server]
Hi Paul,
What happens when you click on a different control, drag the mouse to the button, then release the mouse click?
Users have random mouse clicks.
Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Wednesday, September 11, 2019 10:28 AM To: profoxtech@leafe.com Subject: RE: Detecting mouse click with modifier
Hi Tracy No need to save the value of nShift in the MouseDown - Just check it in MouseUp as Richard suggested. Paul
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Tracy Pearson Sent: 11 September 2019 14:30 To: profoxtech@leafe.com Subject: RE: Detecting mouse click with modifier
Sent by an external sender ------------------------------
Hi Paul,
You will need to save the value of nShift in the MouseDown event, then reference it in the Click event.
HTH, Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Wednesday, September 11, 2019 9:11 AM To: profoxtech@leafe.com Subject: Detecting mouse click with modifier
Hi all
Does anybody know if it is possible to detect whether a modifier key (i.e. CTRL, ALT or SHIFT) was down when the mouse was clicked? I believe it's possible in some languages/frameworks but not in VFP. Would I be correct or is there some way of doing this?
Many thanks
Paul Newton
[excessive quoting removed by server]