
Launch Windows form, from a Windows Service Application
Windows services can not open interactive elements, such as forms, msgboxes,
and other elements. If you want to control the service through a custom
interface you will need to look into Service Controller objects, or use some
type of network communication with sockets.
Quote:
> Hi, my project consists in a Windows Service application, I'd like to
launch
> a Windows Form from OnStart event, like this
> Protected Overrides Sub OnStart(ByVal args() As String)
> ' Add code here to start your service. This method should set things
> ' in motion so your service can do its work.
> Try
> Dim frm As New frmOption()
> System.Windows.Forms.Application.Run(frm)
> Catch ex As Exception
> Write2Log(ex)
> End Try
> End Sub
> The service starts correctly (I set "Allow service to interact with user",
> too) but I don't see the form.
> Anybody can help me?
> TIA,
> Diego