Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX Exe and form non dependent timer

Status
Not open for further replies.

BiggerD

Programmer
Jun 19, 2002
43
GB
I am trying to create an activeX exe that sets up through an API call a timer to fire of every 10 seconds I have a working version that correctly works in the IDE but when I create an EXE it fails to run. I have shown the problem to be that the EXE sets up the timer then as it has no further processing unloads itself and so is not able to receive the event for the timer. Can some one tell me how to make the ActiveX EXE stay resident in the background to receive the timer event ?
I think it must be some thingsimple but have been unable to find out what, may be it is because I am thick.
 
I think you can use following API for the purpose....

' To prevent object going out of scope whilst the timer fires:
Private Declare Function CoLockObjectExternal Lib "ole32" ( _
ByVal pUnk As IUnknown, ByVal fLock As Long, _
ByVal fLastUnlockReleases As Long) As Long

Hope this helps.

Prasad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top