Re: A way to determine .. by Dennis
Dennis
Fri Dec 09 08:29:17 CST 2005
Jack,
That is why I made sure to mention that the container was in a grid column.
I wasn't sure if that was affecting how the container was acting. From
Tanveer's earlier posts, it does appear that the container's right click
event does not fire but I don't know if he had placed it in a grid column.
Dennis Longfellow
"Jack Jackson" <jacknospam@pebbleridge.com> wrote in message
news:6o0ip1dgq4mg19odh3ra0la7egfo738tu7@4ax.com...
> Don't forget that ActiveX controls are in their own windows, unlike
> VFP controls which are not. An ActiveX control in a container does
> not always behave like a VFP control. One obvious difference is that
> a VFP control can not be over top of an ActiveX control since they are
> in different windows.
>
> Also, grids don't necessarily behave like a container object. VFP
> objects in a grid column will sometimes behave differently from the
> same control in a container (for example, in recent versions of VFP
> some controls in a grid column don't get RightClick events).
>
> On Thu, 8 Dec 2005 14:54:49 -0600, "Dennis Longfellow"
> <drlongfellowxxx@xxx.directrac.com> wrote:
>
>>Tanveer,
>>
>>There seems to be two questions here. One about the right click event and
>>one about the key press event.
>>
>>Let's talk about the right click event first. First we know that the
>>ActiveX does not have a right click event, at least that is what you
>>indicated in your post. We also know that the container's right click
>>does
>>not appear to fire. I checked this with the debugger. I have a
>>container
>>with a check box control in it and anotther with a command button control
>>in it. Both of these containers were placed in columns in a grid. I
>>started the debugger and tracked the mouse down, mouse up, and right click
>>event When I right clicked on the embedded controls, the none of these
>>events in the container fired. The two mouse events did fire for the
>>grid.
>>The order of firing was grid mouse down, embedded control mouse down, grid
>>mouse up, embedded control mouse up, embedded control right click. Seems
>>to
>>me you could use the mouse up event when the nButton parameter argument is
>>equal to 2 to trap the right click event provided that the ActiveX control
>>has a mouse up event.
>>
>>Now let's discus the key press event. The key press event fires anytime
>>its
>>control has focus and you press a key. Nothing more, nothing less. So
>>yes,
>>it will fire each time you input from the keyboard. You can trap specific
>>key strokes and issue a NODEFAULT in the event. You might try placing
>>NODEFAULT in the event to stop any input from the keyboard. Does the
>>activeX control have a read only property. You might try setting that to
>>true to stop the user from changing anything.
>>
>>Hope I was able to help,
>>
>>Dennis Longfellow
>>
>>"Tanveer H. Malik" <tanmalik@hotmail.com> wrote in message
>>news:%23zp0MV5%23FHA.1248@TK2MSFTNGP14.phx.gbl...
>>> Yes, but mouse down is not actually the Mouse Click.
>>> What I can do is that I allow the user to select the appointment but
>>> somehow disallow him input through the keyboard - by discarding the
>>> input
>>> made by him - but the behavior of the Keypress event is also strange -
>>> Keypress event is triggered after the input has been made to the
>>> control.
>>> any suggestion on this ?
>>>
>>> "Dennis Longfellow" <drlongfellowxxx@xxx.directrac.com> wrote in message
>>> news:e57FFQ0%23FHA.2708@TK2MSFTNGP12.phx.gbl...
>>>> Tanveer,
>>>>
>>>> I verified the behavior. Seems that a container does not behave as one
>>>> would expect.
>>>>
>>>> I have a container with a command button inside that is in a grid
>>>> column.
>>>> I put a dialog box in the right click event of both the container and
>>>> the
>>>> command button. When testing, only the dialog box in the command
>>>> button
>>>> displayed unless the last line of code in the right click event of the
>>>> container was NODEFAULT, in which case, no dialog box displayed.
>>>>
>>>> I think you will have to use the Mouse Down event as Michel suggested.
>>>>
>>>> Dennis Longfellow
>>>>
>>>> "Tanveer H. Malik" <tanmalik@hotmail.com> wrote in message
>>>> news:eHwutps%23FHA.1256@TK2MSFTNGP15.phx.gbl...
>>>>>I have already got the ActiveX Control - DBi Tech. ctMDay - contained
>>>>>in
>>>>>a container and tried this. I seems somehow that the RightClick event
>>>>>of
>>>>>the container - Though it exists - is also fails to trigger.
>>>>>
>>>>> "Dennis Longfellow" <drlongfellowxxx@xxx.directrac.com> wrote in
>>>>> message
>>>>> news:ebTGWlq%23FHA.740@TK2MSFTNGP12.phx.gbl...
>>>>>> Josh,
>>>>>>
>>>>>> Thanks for the vote of confidence.
>>>>>>
>>>>>> I am not sure I would have even thought of using a container if you
>>>>>> hadn't posted your reply first.
>>>>>>
>>>>>> I think we have Tanveer pointed in the right direction.
>>>>>>
>>>>>> Dennis Longfellow
>>>>>>
>>>>>> "Josh Assing" <Xjosh@jassing.comX> wrote in message
>>>>>> news:anubp19jp5v3niqone86s3q60mbokq2601@4ax.com...
>>>>>>>I like that one way better...
>>>>>>>
>>>>>>> On Tue, 6 Dec 2005 14:06:35 -0600, "Dennis Longfellow"
>>>>>>> <drlongfellowxxx@xxx.directrac.com> wrote:
>>>>>>>
>>>>>>>>Hi Tanveer and Josh,
>>>>>>>>
>>>>>>>>I haven't tested this either.
>>>>>>>>
>>>>>>>>Maybe Tanveer can put the ActiveX control inside of a container,
>>>>>>>>trap
>>>>>>>>the
>>>>>>>>right click event in the container and let the click and double
>>>>>>>>click
>>>>>>>>pass
>>>>>>>>through to the ActiveX.
>>>>>>>>
>>>>>>>>Hope that helps,
>>>>>>>>
>>>>>>>>Dennis Longfellow
>>>>>>>>
>>>>>>>>"Josh Assing" <Xjosh@jassing.comX> wrote in message
>>>>>>>>news:monbp1htk16uhq45qotv38nhr1s5qhpnou@4ax.com...
>>>>>>>>> Just air-coding.
>>>>>>>>>
>>>>>>>>> create an invisable shape object over the activex
>>>>>>>>>
>>>>>>>>> pass the click & dblclick onto the activex && trap the right click
>>>>>>>>> in the
>>>>>>>>> shape.
>>>>>>>>>
>>>>>>>>> I'm thinking this isn't going to work tho - as an activex will
>>>>>>>>> have
>>>>>>>>> it's
>>>>>>>>> own
>>>>>>>>> handle & thus be ontop of the shape... but might be worth a quick
>>>>>>>>> try.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, 6 Dec 2005 22:21:38 +0500, "Tanveer H. Malik"
>>>>>>>>> <tanmalik@hotmail.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>>I am using an ActiveX control which does not provide any thing to
>>>>>>>>>>trap
>>>>>>>>>>RightClick - of the Mouse - is there any other way to figure out
>>>>>>>>>>it
>>>>>>>>>>? the
>>>>>>>>>>usual Click and DblClick events are in place.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --- AntiSpam/harvest ---
>>>>>>>>> Remove X's to send email to me.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --- AntiSpam/harvest ---
>>>>>>> Remove X's to send email to me.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>