473,378 Members | 1,419 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Windows Form Shown on Locked Desktop

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
1 4521
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

383
by: John Bailo | last post by:
The war of the OSes was won a long time ago. Unix has always been, and will continue to be, the Server OS in the form of Linux. Microsoft struggled mightily to win that battle -- creating a...
5
by: me | last post by:
I have a Class Library that contains a Form and several helper classes. A thread gets created that performs processing of data behind the scenes and the Form never gets displayed (it is for debug...
7
by: Lalit | last post by:
Hi Friends, I have developed a Windows service. Now i need icon for this service in systray and context menu fo this icon. Can i do this? With regards, Lalit
2
by: WJ | last post by:
My app. has a dozen forms. Some of them are "Disposed()" when the user clicks the top-right "X" button. Some are not purged (I use "purge" to mean that the form/object is completely removed from...
5
by: Stanley | last post by:
Hi everyone! I can create Windows Service in VB .Net 2003 professional. The problem is that when I try to show up a form in Service Start up event, the form always show up and become stop...
4
by: brandon | last post by:
Anybody out there know how I could go about handling, in a systray'd app, the windows message that the desktop is going to be locked? This way the application can react whenever the Win+L or...
1
by: uuyytt | last post by:
I have a Windows service from which I want to start Internet Explorer with a particular URL as an argument. It can work well except when I run it on windows 2003 I allowed services explicitly to...
2
by: John Smith | last post by:
How do i know if windows has been locked (via ctrl-alt-del)? I need to know because I'm running my app as a service and I want to suppress sounds when the desktop's locked (it currently plays...
15
by: =?Utf-8?B?TVNU?= | last post by:
To demonstrate my problem, I have a very simple VB Windows application. It has a text box that is used to display a counter, a button to reset the counter, and a timer that increments the counter...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.