🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4616

Re: Windows Shutdown Replacement

#4616
From: Remy Lebeau (TeamB)
Date: Wed, 28 Dec 2005 19:11
34 lines
2860 bytes
"Tom" <tom@net.com> wrote in message news:43b2e11a@newsgroups.borland.com...

> My application has three radiobuttons (Stand By, Shutdown and
> Restart) I also have a TEdit control in which user enters desired time
> to execute selected option (format is HH:MM:SS -> for example
> shutdown my computer at 19:15:00)

Then I suggest you not try to replace/alter the existing shutdown dialog for
that.  Provide your own configuration dialog in your application that teh
user can bring up at any time.  Once the user's desired time value has been
saved, you can have the application continuously monitor the current system
time.  When the configured system time arrives, call the ExitWindows/Ex()
function to perform the desired shutdown operation programmably.

> What I'm trying to do is not to have a shortcut on my desktop and
> not to call my application by double click on the icon on the desktop

You could write a service that automatically runs in the background at
system startup, continuously monitoring the time.  You could then provide a
separate .exe or .cpl executable for configuring the service.  In the case
of the .cpl, since it becomes part of the system's Control Panel, you can
make it so only admins can run it, and thus only admins can change the time
your shutdown operation is performed.  You could also specify admin
permisions to the .exe if you want to go that route instead.

> or anywhere else, but to call it by clicking on the Start->Turn Off
Computer.

Why, though?  That is not necessary, and it makes things harder not only for
you, but for the user as well.


Gambit
Technical Details
Message-ID: <43b2e2e8$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.netcologne.de!newsfeed-fusi2.netcologne.de!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43ad3757@newsgroups.borland.com> <43ae6026@newsgroups.borland.com> <43afd98b$1@newsgroups.borland.com> <43b25917$1@newsgroups.borland.com> <43b26430$1@newsgroups.borland.com> <43b2cfcc$1@newsgroups.borland.com> <43b2e11a@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2724a76b8d806cf8
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <43ad3757@newsgroups.borland.com> <43ae6026@newsgroups.borland.com> <43afd98b$1@newsgroups.borland.com> <43b25917$1@newsgroups.borland.com> <43b26430$1@newsgroups.borland.com> <43b2cfcc$1@newsgroups.borland.com> <43b2e11a@newsgroups.borland.com>
Subject: Re: Windows Shutdown Replacement
Date: Wed, 28 Dec 2005 11:11:35 -0800
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <43b2e2e8$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1135796968 68.69.17.41 (28 Dec 2005 11:09:28 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.netcologne.de!newsfeed-fusi2.netcologne.de!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail