Help with message display

Hi everyone,
I am using visual studio 2003. when I try to display message with this code:

MsgBox("Hello World", MsgBoxStyle.Information, "Information")

I get the following error message:

"It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. "

can anyone help please.


  • Are you sure you are running

    MsgBox("Hello World", MsgBoxStyle.Information, "Information")

    from within a form and not within a non-winform class?


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion