Jeff Gaines
unread,Jan 19, 2024, 9:42:30 AM1/19/24You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
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)