Re: Accessing Windows Timer
Re: Accessing Windows Timer
Hi ! Welcome to VBForums !
Yes. You can do it. (but may not be very easy)
I don't have VB right now. So can't post any code. :(
Better Method:
First get the clock's picture by BitBlt API.
Then hook into the tray clock (search codebank for moeur's hooking dll) and listen to WM_PAINT message. When you get this message, discard it, and draw the saved picture on the clock's DC.
Easier Method:
First get the clock's picture by BitBlt API.
Then add a timer with very small interval...say 1 milisecond.
From this Timer1_Timer, draw the saved picture on the clock's DC.
You can get TrayClock's DC by GetDC API.
You can paint on TrayClock's DC by using similar code that I posted here.