Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RTF blues, DHTML control
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00703202
Message ID:
00704225
Views:
54
This message has been marked as the solution to the initial question of the thread.
Hi!

I looked to your form and figured out what is a problem. Do following:
*** ActiveX Control Event - onblur***
this.Enabled = .F.
this.Enabled = .T.
and following:
*** ActiveX Control Event - onmousedown ***
this.SetFocus()
The first on is needed to notify VFP that control loses focus. The second one is to notify VFP that control gets focus.

The real problem is that VFP, for some reason, does not track correctly focus for OLE control. I think this could be reported as a bug to MS. You can see how it works by opening Output window in debugger and switch on events tracking. When going into the OLE control and out of it, LostFocus() and GotFocus() events never fired for OLE control. In VFP6 LostFocus fired, while GotFocus is not etc. Quite strange.

I do not know if my fix will cause no any extra side-effects. Just keep in mins this in case of something.


As about additional events - open MSDN knowledge base library, and look for elements and objects of HTML document - DOM objects model. The events you see are events of the topmost object for HTML document - for window object. They're only events exposed by VFP in design time. The rest of events are deeply inside of the DOM. You can access every object and preoprty of it in HTML document through DOM property, as well as bind to events of each object in run-time. Much like in Java Script - everything you can do in Java Script with HTML document (in IE 5.0), you can do as well with objects in HTML document loaded in this ActiveX. I tried it once and see that this is very powerful and flexible thing.

HTH.

>Vlad,
>
>Yesterday I had a busy day.
>When finally I was able to sit down and do some programming everything went well in my translation from the VB example.
>Until I hit a problem, the DHTML control does not yield focus to my textboxes, meaning when I start entering text and try to go to one of 4 textboxes I have in the form, the clicked texbox gets the focus, but what I type goes to the DHTML control.
>
>I spent some time trying solve this problem but I didn't find a solution.
>Additionally, the control has new properties and events that are not documented in the .chm in the SDK. I searched but didn't find updated help.
>
>I sent you my yesterday's production, I think it complements your previous work, thanks in advance for your ideas.
>
>Max
>
>
>
>
>>Sent to your email address.
>>
>>>Vlad,
>>>Surely I'd like to see what you did.
>>>I'll send you back my form when I finish it.
>>>
>>>
>>>>Hi!
>>>>
>>>>If you need, I can send you what I did so far. I have a few ready icons for toolbars and a very simple sample of file loading/saving and editing.
>>>>
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform