|
-
Jun 11th, 2006, 11:25 PM
#1
Thread Starter
New Member
Accessing Windows Timer
Does anyone know anything about the Windows Timer?... The one that sits in the taskbar and shows you the time... and you can check the date and whatnot?... Can be found in the control panel under "Date and Time" also is a file in the windows/system32 directory as "timedate.cpl" Well anyways...
I was wondering if there was anyway I could "freeze/stop" this timer using a command or series of commands in visual basic. I want to simply stop the timer, not shut it down, not hide it, like freeze the time... I want to stop the windows timer from ticking and just stay at ie... "11:24" even if an hour passes...
Thanks in advance for any help on this topic.
-
Jun 12th, 2006, 05:46 AM
#2
Re: Accessing Windows Timer
-
Jun 12th, 2006, 06:47 AM
#3
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.
Last edited by iPrank; Jun 12th, 2006 at 06:50 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|