By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,534 Members | 1,830 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,534 IT Pros & Developers. It's quick & easy.

Windows Form Shown on Locked Desktop

P: n/a
Fellow C-Sharp developers,

I have an application that must be able to display a message on a
desktop even if the screen saver has locked the computer. If you pass
"ServiceNotification" as a MessageBoxOption on the MessageBox.Show
method, the MessageBox will display even if there is not a user logged
in. Unfortunately, my users want to override the colors as well as
make other modifications to the MessageBox that cannot be done since
the MessageBox Class cannot easily be subclassed. Most people (as well
as myself) would recommend re-creating a standard window with
MessageBox-like functionality. The only problem is that I am having a
problem recreating the "ServiceNotification" functionality of the
MessageBox.

Does anybody have a clue, how this can be done in a C# application? I
have tried several different things like setting the parent during
window creation, setting style and ex-style bits during window
creation, but have not found the trick.

I would appreciate any insight anybody might have on this.

Thanks in advance,
Scott Numbers
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Thanks for the reply Nicholas. I was kind of hoping there was a trick
such as the window using a specific class or being a child of a
specific window or special styles bits. It can obviously be done since
MessageBox does it.

While using Spy++ on the windows to determine infomation about a
MessageBox window, I notice my C-Sharp form window had
'WindowsFormParkingWindow' as the parent window. I would have thought
the parent window would have been none or the Desktop. What is the
purpose of this window?

Anyway, thanks again for the response.
Scott Numbers
"Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com> wrote in message news:<et**************@TK2MSFTNGP11.phx.gbl>...
Scott,

I don't believe that you can do this. I believe that the
ServiceNotification value is only interpreted by the MessageBox API, and not
by regular windows. I can't find anything in MSDN about
MB_SERVICE_NOTIFICATION which would indicate that kind of functionality is
elsewhere.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Scott Numbers" <nu*****@adelphia.net> wrote in message
news:dd**************************@posting.google.c om...
Fellow C-Sharp developers,

I have an application that must be able to display a message on a
desktop even if the screen saver has locked the computer. If you pass
"ServiceNotification" as a MessageBoxOption on the MessageBox.Show
method, the MessageBox will display even if there is not a user logged
in. Unfortunately, my users want to override the colors as well as
make other modifications to the MessageBox that cannot be done since
the MessageBox Class cannot easily be subclassed. Most people (as well
as myself) would recommend re-creating a standard window with
MessageBox-like functionality. The only problem is that I am having a
problem recreating the "ServiceNotification" functionality of the
MessageBox.

Does anybody have a clue, how this can be done in a C# application? I
have tried several different things like setting the parent during
window creation, setting style and ex-style bits during window
creation, but have not found the trick.

I would appreciate any insight anybody might have on this.

Thanks in advance,
Scott Numbers

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.