Pop-Up Thingie
Sidebar
>>> Magnum BBS <<<
Home
Forum
Files
Dark
Log in
Username
Password
Sidebar
Forum
Usenet
UK.COMP.HOMEBUILT
Preventing Shut Down
From
Jeff Gaines
@21:1/5 to
All
on Fri Jan 19 14:42:27 2024
Should have thought of this earlier.
New project (C# in my case) containg just thse lines:
public FormNoShutdown()
{
InitializeComponent();
this.FormClosing += new FormClosingEventHandler(FormNoShutdown_FormClosing);
}
void FormNoShutdown_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.WindowsShutDown)
{
e.Cancel = true;
}
}
Leave it running and if Windows tries to shutdwon it will prevent it, and
you will get the standard screen asking what you want to do.
--
Jeff Gaines Dorset UK
The only thing necessary for evil to prevail is for good people to do or
say nothing. (Edmund Burke)
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
Who's Online
Recent Visitors
Keyop
Sun May 5 19:26:27 2024
from
Huddersfield, West Yorkshire
via
SSH
Keyop
Sun May 5 19:26:11 2024
from
Huddersfield, West Yorkshire
via
SSH
Bob Worm
Mon May 6 11:44:29 2024
from
Wales, Uk
via
Telnet
Bob Worm
Tue May 7 09:06:52 2024
from
Wales, Uk
via
Telnet
System Info
Sysop:
Keyop
Location:
Huddersfield, West Yorkshire, UK
Users:
300
Nodes:
16 (
2
/
14
)
Uptime:
38:52:09
Calls:
6,708
Calls today:
1
Files:
12,241
Messages:
5,353,575