Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Click event firing ... or not?
Message
From
06/11/2008 22:08:39
June Kendrick
Kendrick Associates, Inc.
New York, United States
 
 
To
29/10/2008 16:37:07
June Kendrick
Kendrick Associates, Inc.
New York, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01358161
Message ID:
01360381
Views:
16
Trying to handle form-to-form interactions among modal forms wasn't working. I went back to non-modal forms and modified the .SPR from 2.6 to have a dummy action in the .SPR that is invoked by these non-modal forms when they do a Clear Read. The dummy action then calls Read Events. This halts the .SPR while the non-modal forms do their thing. When they are done, they issue Clear Events and the .SPR goes back to doing it's thing. The only down side to this is that only the main switchboard .SPR can do this, as there can only be one Read Events statement active at a time.

If only the Active X (OLE) click events on non-modal forms didn't quit working when Read Cycle was active. Perhaps whomever figured out what was going on with the loss of the click events for Active X (Ole) controls on Modal forms could figure this out, too.

June

>>>>>I've got a modeless form with an OleThumbnail control & an OleImage control that I've been testing with Do Form from the command window. I have some code in the Click event of the OleThumbnail control. The form and the clicks work as expected when invoked this way.
>>>>>
>>>>>I tried testing within the system, which calls it from a Do Form in a menu pad while a window switchboard created from a .SPR is displayed. Now the OLEThumbnail clicks aren't responding. If I call the form from the menu without the .SPR switchboard showing, it behaves properly. If I hide the switchboard window, the clicks don't respond.
>>>>>
>>>>>I put some debugouts in the Click event of the OleThumbnail control and turned on Event tracking, then tried running each scenario to see what was going on. I found that the Do Form from the command window was showing the Click debugouts, but the appropriaate MouseDown and Click events were not logged. When called from the menu with the .SPR showing, the Click and MouseDown events were logged, but none of the debugouts appeared.
>>>>>
>>>>>In both cases, the GotFocus event and the debugout I had in the GotFocus event code for the control were displayed.
>>>>>
>>>>>Any clues would be appreciated.
>>>>>
>>>>>FWIW, we're using VFP6 with SP4, but the only options in the dropdown are SP5 or SP 3.
>>>>>
>>>>>Thanks,
>>>>>June
>>>>
>>>>What is the active form in the moment of clicking? Can you record this too?
>>>
>>>I click on the title of the form in question, then I click on each of two thumbnail images in the thumbnail control.
>>>
>>>In the case that works, I see the form activate event in the Event Track, and each thumbnail gets selected as expected (due to my code in the click event). In the Event Track, I don't see the control Click, MouseDown and MouseUp events, but I do see the debugout in the control click event.
>>>
>>>In the case that doesn't work, I see the form activate event in the Event Track, and nothing happens when I click on each thumbnail image. In the Event Track, I see the control Click, MouseDown and Mouse Up events, but not my debugout text.
>>>
>>>There is a Read Cycle in the .SPR that creates the switchboard window, FWIW.
>>>June
>>
>>Could it be some zorder issue or images covered with some transparent shape in the second case?
>
>No transparent shapes, and I don't mess with the Zorder, so I think that is unlikely.
>
>It's looking more like it's something to do with the .SPR. In addition to the Read Cycle, it has a do loop to keep it going if the read is cleared. As this part of the system came from Fox 2.6 originally, who knows how it interacts with the more modern parts - not that the Ole Image & Thumbnail controls are that modern anymore. If I get it figured out, I'll post my solution.
>
>It certainly looks like as long as that Read Cycle is active, the OLE Clicks don't work. If I do a Clear Read and step through the .SPR, everything works until the Read Cycle activates again.
>
>After some more testing, it appears that if I make the form (and all the forms that interact with it) modal, then the OLE controls behave properly. Kind of the opposite of MS KB 161148, where the solution is to make the forms modeless.
>
>It's not really what I want, but at least it works now. It's even a problem when run under VFP 9.
Previous
Reply
Map
View

Click here to load this message in the networking platform