Date/Time On Back Ground

Date/Time On Back Ground

Postby RiazKhan » Sat Mar 24, 2012 6:09 am

Dear All,

Apparently, some days back my terminal servers date time went out of sync and ended up in 2004...Many transaction were posted with wrong dates as users did not notice the time frame was wrong.....in 'SET MESSAGE'

I want to display the date and time on the background of my application, on the main screen, like windows 7, with a big font, I tried a couple of methods but the clock is steady..and does not show a running clock..

Any suggestions.....Thanks in advance
FWH 20.04/Harbour3.2/Bcc7.40+/ilink32/Pelles 9.0
EMail: amriazkhan@gmail.com
Pakistan
User avatar
RiazKhan
 
Posts: 99
Joined: Fri Dec 16, 2011 3:30 pm
Location: Pakistan

Re: Date/Time On Back Ground

Postby ukoenig » Sat Mar 24, 2012 6:57 pm

Date and Running-Time visible on the Right / Upper Corner

DS clock 2.6.2 ( Freeware )
Download :
http://www.dualitysoft.com/dsclock/index.html

DS Clock is a FREE digital desktop clock that displays variable date and
time information built from the format string.
The program allows you to fully customize its look and feel.
You can select any combination of date, time, and time zones, insert any text,
pick custom colors and fonts, set custom sound to play at the top of the hour,
play real Westminster chimes, etc.
DS Clock can synchronize your computer's clock with Atomic Time Servers.
It also allows you to show the tool tip window with upcoming reminders of
Calendarscope™ and supports Swatch Internet Time and Stopwatches.


On Appl.-Window
Image

On Window-desktop
Image

Best regards
Uwe :lol:
Last edited by ukoenig on Sat Mar 24, 2012 7:14 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Date/Time On Back Ground

Postby RiazKhan » Sat Mar 24, 2012 7:12 pm

Hi ukoenig,

Many thanks for your response.
I am using DS Clock to display the date time. It works well, only problem I can not disable the feature/clock when the user exists the application.
I use WinExec to execute ds clock..

I tried :
local atasks := gettasks()
SendMessage( FindWindow( atasks[1] ), WM_CLOSE)
inkey(.1)
FWH 20.04/Harbour3.2/Bcc7.40+/ilink32/Pelles 9.0
EMail: amriazkhan@gmail.com
Pakistan
User avatar
RiazKhan
 
Posts: 99
Joined: Fri Dec 16, 2011 3:30 pm
Location: Pakistan

Re: Date/Time On Back Ground

Postby ukoenig » Sat Mar 24, 2012 7:18 pm

Inside the Config-dialog, You can define : loaded at Window-start
No need to execute from inside Your Appl.

Image

Best Regards
Uwe :lol:
Last edited by ukoenig on Sat Mar 24, 2012 7:23 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Date/Time On Back Ground

Postby RiazKhan » Sat Mar 24, 2012 7:22 pm

Yes, Thanks.
That can always be done.
I wanted the DS clock to look as a part of the app. and then vanish upon app. exit..

Regars
FWH 20.04/Harbour3.2/Bcc7.40+/ilink32/Pelles 9.0
EMail: amriazkhan@gmail.com
Pakistan
User avatar
RiazKhan
 
Posts: 99
Joined: Fri Dec 16, 2011 3:30 pm
Location: Pakistan

Re: Date/Time On Back Ground

Postby ukoenig » Sat Mar 24, 2012 9:54 pm

Changing the Display-position :

Uncheck the 2 Checkboxes ( only possible, to move the Display ).
Move the Display to a new Position ( capture with left mouse-button )
Set Check of the 2 Checkboxes ( new Position is locked ).

Image

I prefer the Main-window-Titel-area next to the System-buttons :

Image

Best regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Date/Time On Back Ground

Postby RiazKhan » Mon Mar 26, 2012 5:15 am

Thank you.. Yes I have experimented with all options.
As the DS Clock stays active after the application is exited, which I do not want. There must be an easy way to display date time on main window background of the application.

Thanks for your response, Regards
FWH 20.04/Harbour3.2/Bcc7.40+/ilink32/Pelles 9.0
EMail: amriazkhan@gmail.com
Pakistan
User avatar
RiazKhan
 
Posts: 99
Joined: Fri Dec 16, 2011 3:30 pm
Location: Pakistan

Re: Date/Time On Back Ground

Postby Antonio Linares » Mon Mar 26, 2012 7:34 am

Riaz,

You can use a FWH timer to display the time:

FWH\samples\TestTime.prg
Code: Select all  Expand view
// Using Timers. Timers are also Objects!

#include "FiveWin.ch"

static oWnd, oTimer

//----------------------------------------------------------------------------//

function Main()

   DEFINE WINDOW oWnd FROM 3, 3 TO 20, 50 ;
      TITLE OemToAnsi( "Testing timers" ) ;
      MENU  BuildMenu() COLOR "W+/B"

   SET MESSAGE OF oWnd TO "Controlling time events..."

   ACTIVATE WINDOW oWnd

return nil

//----------------------------------------------------------------------------//

function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "&Timers"
      MENU
         MENUITEM "&Build a Timer" ACTION Timers()
         SEPARATOR
         MENUITEM "&Bye, bye..."   ACTION oWnd:End()
      ENDMENU
   ENDMENU

return oMenu

//----------------------------------------------------------------------------//

function Timers()

   if oTimer == nil
      DEFINE TIMER oTimer ACTION oWnd:Say( 2, 2, Time() )
      ACTIVATE TIMER oTimer
   else
      Alert( "There is already a working timer..." )
   endif

return nil

//----------------------------------------------------------------------------//


If your app uses a msgbar, then you can use its TIME and DATE clauses, which are based on a timer too:

Code: Select all  Expand view

   DEFINE MSGBAR OF oWnd PROMPT "My message bar" TIME DATE KEYBOARD 2007
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Date/Time On Back Ground

Postby ukoenig » Mon Mar 26, 2012 10:43 am

Riaz,

A Tool, I created some Month ago :

The activated Monitor 1 shows the running time Time and the Date
with any defined Background-/ Font-Style.
I can define different Messages for each Monitor with a selected Style.
I can extract the Code of < Monitor 1 > from the Tool, in case it is the Solution, You are looking for ?

Image

It is a FWH- / Timer-solution.

Best Regards
Uwe :?:
Last edited by ukoenig on Mon Mar 26, 2012 11:42 am, edited 5 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Date/Time On Back Ground

Postby RiazKhan » Mon Mar 26, 2012 10:49 am

Thank you Antonio, ukoenig

I modified the testtime source to display the time on screen...but no luck..

ukoenig, this is what im looking for..a transparent date time ontop of the main screen....to be activated on initialization of main window..

Regards..
FWH 20.04/Harbour3.2/Bcc7.40+/ilink32/Pelles 9.0
EMail: amriazkhan@gmail.com
Pakistan
User avatar
RiazKhan
 
Posts: 99
Joined: Fri Dec 16, 2011 3:30 pm
Location: Pakistan

Re: Date/Time On Back Ground

Postby ukoenig » Mon Mar 26, 2012 10:56 am

Riaz,

You do not want it to displayed inside a Box ?
( no Problem, to show just the transparent Text )

Best Regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Date/Time On Back Ground

Postby RiazKhan » Mon Mar 26, 2012 10:58 am

ukoenig,

No Box, simple transparent...Just like Windows 7 or DS Clock.....

Regards
FWH 20.04/Harbour3.2/Bcc7.40+/ilink32/Pelles 9.0
EMail: amriazkhan@gmail.com
Pakistan
User avatar
RiazKhan
 
Posts: 99
Joined: Fri Dec 16, 2011 3:30 pm
Location: Pakistan

Re: Date/Time On Back Ground

Postby ukoenig » Mon Mar 26, 2012 11:02 am

Riaz,

OK, will be done !!!

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Date/Time On Back Ground

Postby Antonio Linares » Mon Mar 26, 2012 11:17 am

Riaz,

Are you using a MDI main window ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Date/Time On Back Ground

Postby RiazKhan » Mon Mar 26, 2012 11:36 am

Yes , Antonio
FWH 20.04/Harbour3.2/Bcc7.40+/ilink32/Pelles 9.0
EMail: amriazkhan@gmail.com
Pakistan
User avatar
RiazKhan
 
Posts: 99
Joined: Fri Dec 16, 2011 3:30 pm
Location: Pakistan

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 102 guests