Hi

Is it possible for VFP to hide the system clock so that no one ca

change the time of the computer
Thanks
Abe

Re: System Clock by Eric

Eric
Mon Feb 02 03:03:59 CST 2004

Hello, Abet!
You wrote on Mon, 2 Feb 2004 00:51:09 -0800:

A> Is it possible for VFP to hide the system clock so that no one can
A> change the time of the computer.

While I think this is possible using an API call to change the windows
registry, I don't think a VFP app should be hiding Windows features. This is
a security level / permission setting that the network admin should take
care of.
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



RE: System Clock by anonymous

anonymous
Mon Feb 02 18:11:11 CST 2004

If your goal is to prevent changing of the clock time so the save datetime is manipulated, you may want to use "! net time \\servername /set /yes" to periodically reset the time (but this does launch a command window and should probably be used for non-production PC time setting) OR have a program running on a machine that regulary changes the file date on a small file on the server and when a record is saved use the date and time of that file as the official date and time. Just some thoughts.

Re: System Clock by christophe

christophe
Tue Feb 03 02:01:30 CST 2004

Abet,

Another possibility is,
is to complete hide the Taskbar !
There is some code to do this but
can't find it, so maybe some else
or me if you have time.

christophe
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º


"Abet" <anonymous@discussions.microsoft.com> schreef in bericht
news:C757AB5D-103A-41CF-9B3D-9B4060433E2F@microsoft.com...
> Hi,
>
> Is it possible for VFP to hide the system clock so that no one can
>
> change the time of the computer.
> Thanks,
> Abet
>



Re: System Clock by christophe

christophe
Tue Feb 03 02:38:04 CST 2004

got it,

this should do it :

FUNCTION HideTaskBar

DECLARE LONG FindWindow IN "user32" STRING lpClassName, STRING
lpWindowName

DECLARE LONG SetWindowPos IN "user32" LONG hWnd, LONG hWndInsertAfter,
LONG x, LONG Y, LONG cx, LONG cy, LONG wFlags

#DEFINE WINDOWHIDE 0x80

#DEFINE WINDOWSHOW 0x40

LOCAL lnHandle

lnHandle = FindWindow("Shell_TrayWnd", "")

SetWindowPos(lnHandle, 0, 0, 0, 0, 0, WINDOWHIDE)

ENDFUNC



FUNCTION ShowTaskBar

DECLARE LONG FindWindow IN "user32" STRING lpClassName, STRING
lpWindowName

DECLARE LONG SetWindowPos IN "user32" LONG hWnd, LONG hWndInsertAfter,
LONG x, LONG Y, LONG cx, LONG cy, LONG wFlags

#DEFINE WINDOWHIDE 0x80

#DEFINE WINDOWSHOW 0x40

LOCAL lnHandle

lnHandle = FindWindow("Shell_TrayWnd", "")

SetWindowPos(lnHandle, 0, 0, 0, 0, 0, WINDOWSHOW)

ENDFUNC



FUNCTION RemoveStartButton

DECLARE LONG FindWindow IN "user32" STRING lpClassName, STRING
lpWindowName

DECLARE LONG SendMessage IN "user32" LONG hWnd, LONG wMsg, LONG wParam,
LONG lParam

DECLARE LONG FindWindowEx IN "user32" LONG hWnd1, LONG hWnd2, STRING
lpsz1, STRING lpsz2

#DEFINE WM_CLOSE 0x10

SendMessage(FindWindowEx(FindWindow("Shell_TrayWnd", ""), 0x0, "Button",
.NULL.), WM_CLOSE, 0, 0)

ENDFUNC



FUNCTION ShowStartButton

DECLARE LONG FindWindow IN "user32" STRING lpClassName, STRING
lpWindowName

DECLARE LONG SendMessage IN "user32" LONG hWnd, LONG wMsg, LONG wParam,
LONG lParam

DECLARE LONG FindWindowEx IN "user32" LONG hWnd1, LONG hWnd2, STRING
lpsz1, STRING lpsz2

#DEFINE WM_CLOSE 0x80

SendMessage(FindWindowEx(FindWindow("Shell_TrayWnd", ""), 0x0, "Button",
.NULL.), WM_CLOSE, 0, 0)

ENDFUNC




--
\|||/
(o o)
----ooO-(_)-Ooo-------------

¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º


"christophe" <askmehere@internet.be> schreef in bericht
news:e6is0vi6DHA.1804@TK2MSFTNGP12.phx.gbl...
> Abet,
>
> Another possibility is,
> is to complete hide the Taskbar !
> There is some code to do this but
> can't find it, so maybe some else
> or me if you have time.
>
> christophe
> ¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
>
>
> "Abet" <anonymous@discussions.microsoft.com> schreef in bericht
> news:C757AB5D-103A-41CF-9B3D-9B4060433E2F@microsoft.com...
> > Hi,
> >
> > Is it possible for VFP to hide the system clock so that no one can
> >
> > change the time of the computer.
> > Thanks,
> > Abet
> >
>
>



Re: System Clock by Anthony

Anthony
Tue Feb 03 03:13:21 CST 2004

"Abet" <anonymous@discussions.microsoft.com> [WA] wrote:


>Is it possible for VFP to hide the system clock so that no one can
>change the time of the computer.

Probably not the solution you want but you could achieve the result you want by
using a web app instead.

Maybe if you provided some more infomation about why you have this requirement,
somebody might have/come up with a solution that suits you....

regards - anthony shipley

look, ma - no .sig

Re: System Clock by Andrew

Andrew
Tue Feb 03 08:07:26 CST 2004

Abet wrote:
> Hi,
>
> Is it possible for VFP to hide the system clock so that no one can
>
> change the time of the computer.
> Thanks,
> Abet

You should restrict the ability to edit the system time in the OS with a
security policy. For windows 9x use "poledit", I think it's in the control
panel on NT machines [sorry don't have one to check right now.]

--
Regards
Andrew Howell



Re: System Clock by Michel

Michel
Tue Feb 03 11:21:40 CST 2004

You should use a Timer in your app, if you really want to track all changes
of date/time of the computer.

I use this way in an app for 5 years, and it run ok (VFP6 SP5, W98 or XP,
multi-user on Lan)

a form with a timer Timer1
In form.init, Timer1.tag = ttoc(datetime( ),1)

In the timer event of the Timer1:
if ttoc(datetime( ),1) < this.tag
do Your_prg_to_stop_app
return
endif
this.tag = ttoc(datetime( ),1)

I've put that timer in all the forms where I wanted to lock the datetime on
the machine, and in My_prg_to_stop_app, I use "! net time \\servername /set
/yes" as Gar wrote, (hiding command window) to restore exact datetime on the
client computer (and to store this attempt in a table for admin...)
Be carefull with the timer.intervall (I init it with 1000).

Michel

"Abet" <anonymous@discussions.microsoft.com> a écrit dans le message de
news:C757AB5D-103A-41CF-9B3D-9B4060433E2F@microsoft.com...
> Hi,
>
> Is it possible for VFP to hide the system clock so that no one can
>
> change the time of the computer.
> Thanks,
> Abet
>