Solved

MessageBox froma a windows service

Posted on 2004-09-13
5
162 Views
Last Modified: 2010-04-24
I need to show a dialog box when something occurs during the execution of a windows service, but it's impossible using MessageBox.Show(string).

Any solution?

Thanks!

Enric.
0
Comment
Question by:EM77
5 Comments
 
LVL 6

Accepted Solution

by:
Svetlin_Panayotov earned 25 total points
ID: 12043323
Well - try this
MessageBoxA(NULL,"Message","Caption",MB_OK);
0
 
LVL 10

Assisted Solution

by:123654789987
123654789987 earned 25 total points
ID: 12111815
put the following code in the service OnStart event and I got a messageBox when the service was started

System.Windows.Forms.MessageBox.Show("Service started on:","",System.Windows.Forms.MessageBoxButtons.YesNo,System.Windows.Forms.MessageBoxIcon.Question,System.Windows.Forms.MessageBoxDefaultButton.Button1, System.Windows.Forms.MessageBoxOptions.ServiceNotification);
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now