DEFINE WINDOW (SYS(2015)) NAME o AT 0, 0 SIZE 1,15 NONE FLOAT this.AddProperty("oTool",o) WITH this.oTool .alwaysontop=.t. .newobject("lbl", "_Label", "libs\default_class.vcx") .lbl.left=0 .lbl.top=0 .lbl.autosize=.t. .lbl.backcolor=0xffffff && maybe get the tooltip color from system colors? .lbl.borderstyle=1 .lbl.visible=.t. .left=-2000 .visible=.t. ENDWITHThen it was a matter of showing this where it should go, for as long as it was needed, and moving it back offscreen. Can't get into that part of the code, or much out of it, because it was around the OCX. Anyway, here's the relevant code:
PROCEDURE OnShowHint *** ActiveX Control Event *** LPARAMETERS x, y, hint, ignore *SET STEP ON thisform.setHint(x, y, hint, not ignore) ENDPROC *-- form.sethint: Lpara tnleft, tntop, tcHint, lShow lshow=lshow and !EMPTY(tcHint) With This.oTool .lbl.Caption=" "+tcHint+" " If lShow && this.ocnt is the OCX .Top=tntop+3-this.ocnt.Top .Left=tnleft+32 .width=.lbl.width .height=.lbl.height ELSE .left=-2000 Endif * .Visible=lShow EndwithI wrote this because there was some problem with OCX's own tooltips, which wouldn't go beyond VFP form's viewport and would show up in unpredictable positions.