I have a machine that will be used to demo some Excel spreadsheets at a
convention. Because I did not author the spreadsheets and attendees will be
allowed to play with the spreadsheets, I needed a way to periodically
restore the original versions. In addition to the "always-on-top click this
button to reset demo" application I wrote, I chose to use screen saver code
to reset the demo after a period of inactivity in the event an attendee just
walked away. I chose the screen saver method because I was unsure how to
capture the system traps since my reset-app will not always have focus and
so using the screen saver method seemed to be the quickest/easiest solution.
So...
I can spawn a new process from an application and that process remains
running after the application is closed. This is good.
Using the same code in a screen saver and running it while its an .EXE
(prior to renaming it .SCR & relocating it to the system directory), the new
process remains running after the screen saver application is closed. This
is good.
I rename the screen saver to .SCR, relocate it in the system directory,
right-click the Desktop background, select Properties / Screen Saver / etc.,
click the Preview button to execute the screen saver and the new process
remains running after I select Ok or Cancel to cancel the screen saver.
This is good.
Now I allow the system to kick off the screen saver at whatever inactivity
timeout. The screen saver executes, the new process executes but it closes
when the screen saver closes. This is bad.
Here is the code being used:
private void ScreenSaverForm _Load(object sender, System.EventArg s e)
{
string InstallPath =
(string)Registr y.LocalMachine. OpenSubKey(@"SO FTWARE\MyApp"). GetValue(@"Path ");
ProcessStartInf o startInfo = new ProcessStartInf o(InstallPath +
@"\MyFile.xls") ;
startInfo.Windo wStyle = ProcessWindowSt yle.Maximized;
Process.Start(s tartInfo);
Close();
}
I have also tried including "startInfo.UseS hellExecute = true;" but results
were the same.
Unless I am totally off then obviously the operating system is
handling/executing screen saver code differently at the final stage. Other
than basic skeleton code required for a screen saver, I am unable to find
any 'real' documentation on screen saver programming. For example, through
trial & error I discovered that the screen saver filename must follow the
8.3 naming convention - unless I'm doing something wrong there as well?
Anyway...
1. Most importantly, what is the code for spawning a new process from within
a system activated screen saver such that the new process remains running
after the screen saver closes?
2. Is a screen saver filename in fact limited to the 8.3 naming convention?
3. Where is the screen saver application name set or read from? For example;
if your filename is 'ssMyDemo.scr' then the system will drop the prefix of
'ss' and display 'MyDemo' in the screen saver list. If there is no 'ss'
then the filename, excluding extension, will display in the screen saver
list. But if you examine a default OS provided screen saver you will see
that the filename 'ss3dfo.scr' displays as '3D Flying Objects' in the screen
saver list. How is this accomplished?
4. Is there a "Everything you ever wanted to know" type source on screen
saver programming; net, book or otherwise?
TIA,
-Jeff 0 3276 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Timmah |
last post by:
I have a Visual Basic menu script that I am trying to get to clear the
dos screen it is running in. Basically, you select an option from the
menu, and after the processing is complete, a "press enter to
continue" comes up. When enter is pressed I'd like the DOS screen the
script is running in to clear (and the menu to be displayed again).
Is there any way to do this? I've tried many different things, but I
seem to have trouble actually...
|
by: C Gillespie |
last post by:
Dear All,
I have a function
def printHello():
fp = open('file','w')
fp.write('hello')
fp.close()
I would like to call that function using spawn or fork. My questions are:
|
by: googlemike |
last post by:
I'm trying to use Python and PyGTK + Glade, along with Bash. I want to
make a GUI for the Linux vpnclient command-line tool. (Look for
linux-vpnclient.tar.gz on the Internet if you are curious.) Anyway,
this vpnclient tool connects to VPN and then stays locked like that
while the VPN connection is running. What I was trying to do was either
spawn it and then use another command-line tool to check on its status,
or shell the process and...
|
by: Paul |
last post by:
Hi all.
Can someone provide some help on the following as there seems to be many
different methods of acheiving the same outcome.
Basically I am trying to develop a web service which will spawn an exe file
to run an import and then return a result back to the web service, this
would also need the facility to spawn multiple copies of the application
upto a maximum figure..............
|
by: Shawn Mehaffie |
last post by:
I have created a screen saver using VB.Net but cannot find any articles or
examples on how to write the code for the /p parameter (display in dialog
preview window). All the .Net exmaples I have found skip this functionality
and simply put, this requires advance threading and is beyond the scope of
this example.
Can anyone please give me an answer to this or at least give me a link to
where I can find this information.
S. Shawn...
| |
by: kevin |
last post by:
Not sure if this is the right place for this, if not please direct me
accordingly. I have made a screen saver, and it has some options. How
do I get those options to be available from the Windows screensaver
properties Window?
thanks
kevin
|
by: Sinan Nalkaya |
last post by:
hi, i am using os.spawn function, it works well but i need a flag that
allows function return the process id with exit/error code, is there
any or how can i do it, i can replace spawn with fork/exec if
necessary.
thanks.
|
by: somuchh8 |
last post by:
Hi, I'm having a lot of trouble with the Win32::Spawn module in perl. Here is my situation, I have a Win32::Spawn call which looks like this:
my $success = undef;
my $cmdline = EBDTools::os_path("${nh_home}/web/aview/modules/svcrsp-ng/saSync.pl");
$success = Win32::Spawn($^X, "${^X} $cmdline ${optfile}", $pid);
if (! $success) {
my $lasterr = Win32::GetLastError();
return_configerror("Failed to create commit / sync process...
|
by: Brendan Miller |
last post by:
I want to spawn a child process based on an external executable that I have
the path for. I then want to wait on that executable, and capture it's
output.
In the os module, fork is only supported on unix, but spawn is only
supported on windows.
The os.system call is implemented by calling the C system call, which is of
course inefficient and has portability gotchas because it calls the
underlying system shell (sh for unix, cmd for...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |