|
-
Aug 19th, 2001, 08:46 PM
#1
Thread Starter
New Member
Use API to reset Windows tray clock?
I wrote a DLL in VC++ that accesses an ADC chip through the parallel port and displays a waveform on a VB picturebox. In that DLL, I disable the system interrupts during the waveform sampling period to prevent jitter from mouse movements and whatever else is raising an interrupt at that moment. Anyway, when the interrupts are disabled, the Windows tray clock loses time because it's not getting timer interrupts from the PIT. I can read the CMOS RTC from port 70H and 71H but I tried resetting the clock with the API functions SetSystemTime and SetLocalTime, this however does not update the tray clock. I can't figure it out. Anyone know the secret? Thanks.
John Voltz
-
Aug 19th, 2001, 09:01 PM
#2
Frenzied Member
In VB setting the system time is as easy as
Time$ = "5:32:24"
and reading the time is
Dim sMyTime As String
sMyTime = Time$
The tray clock will update but not right away becuase it does not display seconds so there is no need to. I wonder if you got the handle to the tray and used SendMessage or PostMessage to send a WM_PAINT message to the tray to force it to repaint.
Greg
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
|