Does anyone know ANYTHING about SetTimer() ??? 
Author Message
 Does anyone know ANYTHING about SetTimer() ???

Hi,
Nobody seems to have much to say about this elusive API function.  I would
be very, very grateful for any information leading to further knowledge
about it.  I can get it to run (nearly by accident I think) but don't know
how to stop it.  If I kill my calling app I get a {*filter*} GPF error because
SetTimer() is still trying to call the function I passed it.

Also, I have Dan Applemans API book for VB5.  However, the functions that I
usually need are often not documented in this otherwise excelent book.  Does
a COMPLETE API reference book/site/CD exist anywhere describing parameters,
example code and possible scenarios???  Thanks again for any 'pointers' in
the right direction.
Kind regards,

Nicholas Trevatt



Fri, 01 Dec 2000 03:00:00 GMT  
 Does anyone know ANYTHING about SetTimer() ???


|Hi,
|Nobody seems to have much to say about this elusive API function.  I would
|be very, very grateful for any information leading to further knowledge
|about it.  I can get it to run (nearly by accident I think) but don't know
|how to stop it.  If I kill my calling app I get a {*filter*} GPF error because
|SetTimer() is still trying to call the function I passed it.
Declare Function KillTimer Lib "user32" Alias "KillTimer" (ByVal hwnd As
Long, ByVal nIDEvent As Long) As Long
[snip]
--
Damit Senanayake
Venturis Web Design - http://www.*-*-*.com/
ICQ UIN: 6930718
SBN Level 2 Member
MSDN Online Member

"Honey, I shrunk the kids." -- from movie of same name

begin 666 Damit Senanayake.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..E-E;F%N87EA:V4[1&%M:70-
M"D9..D1A;6ET(%-E;F%N87EA:V4-"E)%5CHQ.3DX,#8Q-50P,S,Y,S=:#0I%

`
end
end



Fri, 01 Dec 2000 03:00:00 GMT  
 Does anyone know ANYTHING about SetTimer() ???

Thankyou Damit.  I appreciate your time very much.   I have just one more
query though.  What do I use for the handle (hwnd) and event (nIDEvent)?  I
presumed that the nIDEvent was the ID of the timer so I was just using a
counter (i = i + 1) each time I created a timer.  Is this Correct?  If the
nIDEvent is used to uniquely identify a particular timer what is the handle
for?  The identifier of the calling app?

Quote:



>|Hi,
>|Nobody seems to have much to say about this elusive API function.  I would
>|be very, very grateful for any information leading to further knowledge
>|about it.  I can get it to run (nearly by accident I think) but don't know
>|how to stop it.  If I kill my calling app I get a {*filter*} GPF error because
>|SetTimer() is still trying to call the function I passed it.
>Declare Function KillTimer Lib "user32" Alias "KillTimer" (ByVal hwnd As
>Long, ByVal nIDEvent As Long) As Long
>[snip]
>--
>Damit Senanayake
>Venturis Web Design - http://www.*-*-*.com/
>ICQ UIN: 6930718
>SBN Level 2 Member
>MSDN Online Member

>"Honey, I shrunk the kids." -- from movie of same name



Fri, 01 Dec 2000 03:00:00 GMT  
 Does anyone know ANYTHING about SetTimer() ???


|Thankyou Damit.  I appreciate your time very much.   I have just one more
|query though.  What do I use for the handle (hwnd) and event (nIDEvent)?  I
|presumed that the nIDEvent was the ID of the timer so I was just using a
|counter (i = i + 1) each time I created a timer.  Is this Correct?  If the
|nIDEvent is used to uniquely identify a particular timer what is the handle
|for?  The identifier of the calling app?
[snip]
From the MSDN:

[SetTimer:]
hWnd -Identifies the window to be associated with the timer. This window
must be owned by the calling thread. If this parameter is NULL, no window is
associated with the timer and the nIDEvent parameter is ignored.
nIDEvent - Specifies a nonzero timer identifier. If the hWnd parameter is
NULL, this parameter is ignored.

[KillTimer:]
hWnd - Identifies the window associated with the specified timer. This value
must be the same as the hWnd value passed to the SetTimer function that
created the timer.
uIDEvent - Specifies the timer to be destroyed. If the window handle passed
to SetTimer is valid, this parameter must be the same as the uIDEvent value
passed to SetTimer. If the application calls SetTimer with hWnd set to NULL,
this parameter must be the timer identifier returned by SetTimer.

Hope this helps.
--
Damit Senanayake
Venturis Web Design - http://members.xoom.com/damit
ICQ UIN: 6930718
SBN Level 2 Member
MSDN Online Member

"Honey, I shrunk the kids." -- from movie of same name

begin 666 Damit Senanayake.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..E-E;F%N87EA:V4[1&%M:70-
M"D9..D1A;6ET(%-E;F%N87EA:V4-"E)%5CHQ.3DX,#8Q-50Q,3 T-#E:#0I%

`
end
end



Fri, 01 Dec 2000 03:00:00 GMT  
 Does anyone know ANYTHING about SetTimer() ???

Hi,

Quote:
>Also, I have Dan Applemans API book for VB5.  However, the functions that I
>usually need are often not documented in this otherwise excelent book.
Does
>a COMPLETE API reference book/site/CD exist anywhere describing parameters,
>example code and possible scenarios???  Thanks again for any 'pointers' in
>the right direction.

The most complete API reference I've found is the Win32 programmer's
reference. It's in Windows helpfile format,  and it's available somewhere on
ftp.borland.com, I don't know the exact location. You can also try to search
for win32.hlp. Be warned though, it's over 10 megs. The only problem with
this reference is that it's not meant for VB, it's declarations are in C,
but most declarations are available in the API viewer anyway. The
explanations of the various parameters are excellent, and I've still to find
an Windows API function that isn't described in this book. Hope this helps!

********************************************
Sebastian Strand
sebastian.strand *AT* pp.inet.fi
http://personal.inet.fi/cool/dragon/vb/
********************************************



Fri, 01 Dec 2000 03:00:00 GMT  
 Does anyone know ANYTHING about SetTimer() ???

Nicholas-

Check your VB5 CD (I believe in the 'unsupported' directory) for
a project called (something like) "XTIMERS.VBP".  It uses the
SetTimer & KillTimer API's to create a form-less timer, plus
gives you the scoop on how to avoid GPF's.

Some of this subject is also in the CoffeeWatch project in Books Online,
in the Asynchronous ActiveX server documentation/examples.

BTW- sometimes it's easier to declare With Events "As New" a timer on a hidden form & use
it as a quasi-"code-only" timer; the only time you really can't do this is if your project must
be set to run in Unattended Execution.

HTH,
Paul Smith

Quote:

>Hi,
>Nobody seems to have much to say about this elusive API function.  I would
>be very, very grateful for any information leading to further knowledge
>about it.  I can get it to run (nearly by accident I think) but don't know
>how to stop it.  If I kill my calling app I get a {*filter*} GPF error because
>SetTimer() is still trying to call the function I passed it.

>Also, I have Dan Applemans API book for VB5.  However, the functions that I
>usually need are often not documented in this otherwise excelent book.  Does
>a COMPLETE API reference book/site/CD exist anywhere describing parameters,
>example code and possible scenarios???  Thanks again for any 'pointers' in
>the right direction.
>Kind regards,

>Nicholas Trevatt




Fri, 01 Dec 2000 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Has anyone done anything adventurous in VB.Net??

2. CGI Help...Anyone Know Anything?

3. Anyone know anything about Lotus Approach?

4. anyone know anything about this?

5. Regocx32.exe - anyone know anything about this file?

6. Does anyone know anything about TAPI.DLL??

7. Does anyone know anything about unbound fields?

8. Does anyone know anything about DirectPLay in VB?

9. AnyOne knows How It can Be Done?

10. AnyOne knows How It can Be Done?

11. Assistant not doing anything because system is busy?

12. anything special that needs to be done for Terminal Server

 

 
Powered by phpBB® Forum Software