FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Date/Time On Back Ground
Posts: 99
Joined: Fri Dec 16, 2011 03:30 PM
Date/Time On Back Ground
Posted: Sat Mar 24, 2012 06: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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Date/Time On Back Ground
Posted: Sat Mar 24, 2012 06: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


On Window-desktop


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.
Posts: 99
Joined: Fri Dec 16, 2011 03:30 PM
Re: Date/Time On Back Ground
Posted: Sat Mar 24, 2012 07: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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Date/Time On Back Ground
Posted: Sat Mar 24, 2012 07:18 PM
Inside the Config-dialog, You can define : loaded at Window-start
No need to execute from inside Your Appl.



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.
Posts: 99
Joined: Fri Dec 16, 2011 03:30 PM
Re: Date/Time On Back Ground
Posted: Sat Mar 24, 2012 07: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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Date/Time On Back Ground
Posted: Sat Mar 24, 2012 09: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 ).



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



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.
Posts: 99
Joined: Fri Dec 16, 2011 03:30 PM
Re: Date/Time On Back Ground
Posted: Mon Mar 26, 2012 05: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Date/Time On Back Ground
Posted: Mon Mar 26, 2012 07:34 AM
Riaz,

You can use a FWH timer to display the time:

FWH\samples\TestTime.prg
Code (fw): Select all Collapse
// 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 (fw): Select all Collapse
   DEFINE MSGBAR OF oWnd PROMPT "My message bar" TIME DATE KEYBOARD 2007
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Date/Time On Back Ground
Posted: 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 ?



It is a FWH- / Timer-solution.

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.
Posts: 99
Joined: Fri Dec 16, 2011 03:30 PM
Re: Date/Time On Back Ground
Posted: 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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Date/Time On Back Ground
Posted: 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.
Posts: 99
Joined: Fri Dec 16, 2011 03:30 PM
Re: Date/Time On Back Ground
Posted: 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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Date/Time On Back Ground
Posted: 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.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Date/Time On Back Ground
Posted: Mon Mar 26, 2012 11:17 AM

Riaz,

Are you using a MDI main window ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 99
Joined: Fri Dec 16, 2011 03:30 PM
Re: Date/Time On Back Ground
Posted: 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