News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

How to show the system time on the desktop.

Started by Bill Cravener, May 23, 2012, 09:41:08 PM

Previous topic - Next topic

Bill Cravener

I've been meaning to post this Masm32 example for several months now but summer came in March here in Northwest PA and I've been enjoying it very much! Well I figured what better time to do so then now when Steve has started up his new Masm32 board.  :biggrin:

Anyway, here is a simple example on how to display the time on your desktop. My plan was to make this a tray utility but as I stated above I've been enjoying the weather. I have several examples on my website page (linked below) that shows how to make a tray utility so it would be a simple deal to make this example as such.


http://www.quickersoft.com/examples/DTClock.zip

Or it can be downloaded from my site link below.

hutch--


jj2007

Quote from: Bill Cravener on May 23, 2012, 09:41:08 PM
Or it can be downloaded from my site link below.

The clock is awesome, Bill :t

Bill Cravener

Quote from: hutch-- on May 23, 2012, 11:44:50 PM
Bill,

Are you still riding that Yamaha ?

Hi Steve, though I still ride I no longer own the V-Star 1100 Classic, I sold it last year. In fact I don't personally own a motorcycle anymore. When I want to ride, since I often do work for Knievel Cycles and have known the CEO, COO and Employees for so many years, they let me ride one of the display models whenever I feel like riding.

Here's one I road a few times that was built for the University of Georgia. It's a Pro-Street model with a Harley engine, a real go-fast machine (I make all the seats for their bikes). Knievel now has four dealerships, two overseas (one in France, one in Norway), and two here in the states (one in Florida and one in Texas). It's been tough going for the company cause of the economy (their bikes are pretty expensive) but they're hanging in there.




Bill Cravener


dedndave



hutch--

Bill,

Years ago in my business I used to refinish Harley parts for the bike guys and got to see a lot of very rare stuff, knuckleheads, and panheads as well as the later shovels and blockheads. I knew this guy who had a panhead chopper that was so PHUKING heavy that it use to flex the 1" handlebars when you grunted it off its side stand.

FORTRANS


Bill Cravener


Bill Cravener

Quote from: hutch-- on May 25, 2012, 12:07:05 AM
Bill,

Years ago in my business I used to refinish Harley parts for the bike guys and got to see a lot of very rare stuff, knuckleheads, and panheads as well as the later shovels and blockheads.

Steve,

Here in Sharon PA we have what they call "Bike Night" every Wednesday during the warmer months (started really early this year) and folks ride their bikes to a restaurant called Quaker-Steak and Lube. You'll see hundreds of bikes (mostly Harleys) and some will be restored Old Timers. The old ones and the customs are the most interesting to check out. I've been a rider since I was a kid riding mini-bikes and what I miss the most is the ability to maintain a bike yourself. These days bikes are fuel-injected with complicated electronic ignition systems, highly tuned exhaust systems and computer controlled everything else. It has gotten to the point all you can do on your own with the newer bikes is scratch your head.  :icon_confused:

Bill Cravener

I received a friendly private message from the member Antariy about my DTClock example and he pointed out that I forgot that much of the world uses the 24 hour format.

QuoteIt is need to change the code in the TextOut part as following:
Code: [Select]
            invoke lstrlen,ADDR TimeString
            invoke TextOut,hDC,0,0,ADDR TimeString,eax

Because in the countries where regional settings for time using 24-hour format, there is no leading "0" for the hours, so, for 09:12:34AM the GetTimeFormat returns 9:12:34, and when code uses hardcode string length for TextOut, the 8th char to output is zero, which actually printed as square. I.e. the clock on desktop looks like 9:12:34 (I do have a screenshot of it, but PMs didn't seem to have attachment option).

Otherwise very nice and clean example  :t

I've made the suggested change to the little example and it can be downloaded above at my first post.

Thanks Antariy!  :biggrin:


dedndave

i think if you use TIME_FORCE24HOURFORMAT, the leading 0 is there   :P
of course, not everyone wants that - lol
i like that flag because it makes the format very predictable

Bill Cravener

Well Dave being that you're an ex-military fellow I suppose you feel comfortable with the 24 hour format. I'm old, set in my ways, and prefer standard time thank you.  :biggrin:

dedndave

not so much the military
but -  i have been playing with ham radio since i was a kid
we use 24 hour time - and, in fact, most hams use UTC (used to be called GMT) or "Zulu"
that way, we are all using the same clock
we might write a time as: 1330Z, meaning it is 1:30 PM someplace in England   :P