Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_mouseover Error Quandry
Message
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00176230
Message ID:
00176544
Views:
51
>>>>I've added the _mouseover class to a form; the form runs in a top-level form. The form works fine when running along, but when I run it as part of the app, or exe, it behaves oddly.
>>>>
>>>>If I mouse over the navigation controls that use the effects, and then use the "X" to close the form, the X suddenly disables (and the CLOSE is gone from the Windows menu). If I place the mouse back over one of the other controls I get:
>>>>
>>>>Data type mismatch
>>>>highlightme
>>>>Line 34
>>>>
>>>>Line 34 is:
>>>>
>>>>WITH This.oHost
>>>>
>>>>then a string of successive error messages appears, each relating to the various expressions inside the WITH.
>>>>
>>>>After adding the mouseover effects class I added cancelhighlight to the control container and the form (something that is not used in TASTRADE). And I also added this code to prevent disabled controls from being highlighted:
>>>>
>>>>*MouseMove of each button
>>>>if thisform._datanavbtns1.cmdtop.enabled=.t.
>>>>THISFORM._mouseOverFX1.HighlightMe(this)
>>>>endif
>>>>
>>>>Any ideas how I can resolve this?
>>>
>>>
>>>Sounds like you have a hanging object reference some where in your code. Be sure to NULL out any stored object references you may have in your form destroy event.
>>
>>For fear of sounding REALLY stupid, how do I do this?
>>
>>TIA,
>
>For example: Say you've created an object reference property on your form to some control on the form.
>
>MyForm.MyObjectRef = MyForm.TextBox1
>
>When you do your form Destroy Method, you should put a this.MyObjectRef = .NULL. there, otherwise you'll have a "dangling object reference" that will prevent your form from closing properly.
>
>Does this help?


Well, my first thought was of an OLD English teacher and her constant chiding about "Dangling Participles".....but that's for another thres <g>

I'm real new to this. I don't think I have such a reference property, but I don't know.

In the Click event of the option buttons, I have:

SET ORDER TO TAG custno
GO TOP
THISFORM.combo2.COLUMNWIDTHS="62,190"
THISFORM.combo2.ROWSOURCE="Customer_Ship_To.custno,custname"
THISFORM.combo2.REQUERY()
thisform.combo2.listindex=1
THISFORM.REFRESH()
THISFORM.combo2.SETFOCUS()

In the click events of the cmdbtns I have:

DODEFAULT()
IF TAG()='CUSTNO'
THISFORM.combo2.VALUE=Customer_Ship_To.CUSTNO
ENDIF
IF TAG()='CUSTNAME'
THISFORM.combo2.VALUE=Customer_Ship_To.CUSTNAME
ENDIF
THISFORM.combo2.REFRESH()

and in the MouseMove event of the cmdbtns I have:

LPARAMETERS nButton, nShift, nXCoord, nYCoord
if thisform._datanavbtns1.cmdtop.enabled=.t.
THISFORM._mouseOverFX1.HighlightMe(this)
endif

Perhaps you can help me determine if I have dangled a reference :)

TIA
Phil Thomas
http://phillipdthomas.com

Never let your energy or enthusiasm be dampened by the discouragements that must inevitably come.....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform