I think it's the RELEASE _SCREEN.oSH. According to the VFP help file you can RELEASE a memvar, but it says nothing about properties.
>Hi all
>
>In my app class Init():
>
IF THIS.lMinToSysTray
> SET LIBRARY TO bbsystray.fll ADDITIVE
>
> _SCREEN.ADDPROPERTY("oSH")
> _SCREEN.oSH = CREATEOBJECT("ScreenHook")
> ENDIF
>
>In the app class Destroy()
>
IF THIS.lMinToSysTray
> _SCREEN.oSH = .NULL.
>
> RELEASE _SCREEN.oSH
>
> RELEASE LIBRARY bbsystray.fll
>ENDIF
>
>
>When this code is executed based on .T. of the flag on exiting the application I generate a C0..05 but when this code is not executed (.F.) then no errors are generated.
>
>So I guess something is wrong with this code.
>
>What am I doing wrong. Please advise.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer