Hi,
I have created a Service with vb.NET 2005 and I want to show a form. How can
I do this? Can I do it like this? Or should'nt I use a form in a service at
all?
Private oMain As Main
Protected Overrides Sub OnStart(ByVal args() As String)
' Code zum Starten des Dienstes hier einfügen. Diese Methode sollte
Vorgänge
' ausführen, damit der Dienst gestartet werden kann.
Try
oMain = New Main
oMain.Show()
Catch ex As Exception
MsgBox(ex.ToStr ing)
End Try
End Sub
If I do so then the form is shown but it say "No response".
Thanks in advance
Kind regards
Stefan 4 1393
Hi
>From what I understand you shouldn't have any UI elements in your
service as a service can run irrespective of whether a user is logged
on or not and runs under a system process etc. (could be wrong though).
If you just want the user to be able to interact with your service
(changing settings, start/stop the service etc) then take a look at the
following article that should help. http://www.devcity.net/Articles/74/1...ontroller.aspx
Thanks
Martin
hex40 wrote:
Hi,
I have created a Service with vb.NET 2005 and I want to show a form. How can
I do this? Can I do it like this? Or should'nt I use a form in a service at
all?
Private oMain As Main
Protected Overrides Sub OnStart(ByVal args() As String)
' Code zum Starten des Dienstes hier einfgen. Diese Methode sollte
Vorgnge
' ausfhren, damit der Dienst gestartet werden kann.
Try
oMain = New Main
oMain.Show()
Catch ex As Exception
MsgBox(ex.ToStr ing)
End Try
End Sub
If I do so then the form is shown but it say "No response".
Thanks in advance
Kind regards
Stefan
IN VB6 I wrote an exe having several forms. You could run this Program as a
service If you used a ntsvc.ocx. In the property page of the service you had
to say that the service runs under the local system account and that it
interacts with the desktop.
My Service in VB.NET logs on an ftp Server and processes documents. And I
want to show the ftp communication in a form and also what the actual batch
is that is uploaded etc. If I have to write a service without UI then I
should write another program that interacts with my service. How can I manage
this? .NET Remoting? I can't find a simple exmaple for that technique!
Thanks in advance
Stefan
"Pritcham" schrieb:
Hi
From what I understand you shouldn't have any UI elements in your
service as a service can run irrespective of whether a user is logged
on or not and runs under a system process etc. (could be wrong though).
If you just want the user to be able to interact with your service
(changing settings, start/stop the service etc) then take a look at the
following article that should help.
http://www.devcity.net/Articles/74/1...ontroller.aspx
Thanks
Martin
hex40 wrote:
Hi,
I have created a Service with vb.NET 2005 and I want to show a form. How can
I do this? Can I do it like this? Or should'nt I use a form in a service at
all?
Private oMain As Main
Protected Overrides Sub OnStart(ByVal args() As String)
' Code zum Starten des Dienstes hier einfügen. Diese Methode sollte
Vorgänge
' ausführen, damit der Dienst gestartet werden kann.
Try
oMain = New Main
oMain.Show()
Catch ex As Exception
MsgBox(ex.ToStr ing)
End Try
End Sub
If I do so then the form is shown but it say "No response".
Thanks in advance
Kind regards
Stefan
Hi
>From what I understand you can mark a service as interacting with the
desktop from the Services control panel - not sure how you would do
this via code.
As for how you could/would have another program to interact with your
service, this is detailed in the link I suggested (which uses IIS as
its example service).
Again, I'm not overly familiar with service programming so all of this
is info I've gleaned recently while looking at whether creating a
service was the right thing for me (which it wasn't in the end) but if
you need to interact with your service then you can issue custom
commands to your service for it to perform whatever actions you need it
to.
Sorry I can't be of more help
Martin
hex40 wrote:
IN VB6 I wrote an exe having several forms. You could run this Program asa
service If you used a ntsvc.ocx. In the property page of the service you had
to say that the service runs under the local system account and that it
interacts with the desktop.
My Service in VB.NET logs on an ftp Server and processes documents. And I
want to show the ftp communication in a form and also what the actual batch
is that is uploaded etc. If I have to write a service without UI then I
should write another program that interacts with my service. How can I manage
this? .NET Remoting? I can't find a simple exmaple for that technique!
Thanks in advance
Stefan
"Pritcham" schrieb:
Hi
>From what I understand you shouldn't have any UI elements in your
service as a service can run irrespective of whether a user is logged
on or not and runs under a system process etc. (could be wrong though).
If you just want the user to be able to interact with your service
(changing settings, start/stop the service etc) then take a look at the
following article that should help. http://www.devcity.net/Articles/74/1...ontroller.aspx
Thanks
Martin
hex40 wrote:
Hi,
>
I have created a Service with vb.NET 2005 and I want to show a form. How can
I do this? Can I do it like this? Or should'nt I use a form in a service at
all?
>
Private oMain As Main
>
Protected Overrides Sub OnStart(ByVal args() As String)
' Code zum Starten des Dienstes hier einfgen. Diese Methode sollte
Vorgnge
' ausfhren, damit der Dienst gestartet werden kann.
>
Try
oMain = New Main
oMain.Show()
Catch ex As Exception
MsgBox(ex.ToStr ing)
End Try
End Sub
>
If I do so then the form is shown but it say "No response".
>
Thanks in advance
Kind regards
Stefan
hex40 wrote:
IN VB6 I wrote an exe having several forms. You could run this Program as a
service If you used a ntsvc.ocx. In the property page of the service you had
to say that the service runs under the local system account and that it
interacts with the desktop.
You can do the same with a service created in VB.Net. But it is not
recommended. I also read that in Windows Vista, coming out Q1 next
year, that services will no longer be able to interact with the
desktop. If you will be upgrading to Vista any time soon, you might
have troubles with your service. I'm not 100% sure on this last
point, however.
My Service in VB.NET logs on an ftp Server and processes documents. And I
want to show the ftp communication in a form and also what the actual batch
is that is uploaded etc. If I have to write a service without UI then I
should write another program that interacts with my service. How can I manage
this? .NET Remoting? I can't find a simple exmaple for that technique!
I believe that is the recommended approach. You might also be able to
use named pipes to have your UI program communicate with your service.
I don't have an example handy, but you should be able to Google one up,
though. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Szafranr |
last post by:
Hi everyone,
I have NT service from which I try to display window form.
This form is created in sub New.
In servise I implemented OnCustomCommand handle, when I wait for command 129
and for this command I try to do form.Show() but I can't see this window :-(
I checked by filelog - form_load is running after send command.
Is possible to display window by that way?
If yes please tell me how.
|
by: Bryan Dickerson |
last post by:
I fairly have my Web Service working the way that I want, so my next step
will be to deploy it on a server. Do I just add a deployment/install
project, build it and install it on the server?
TIA!
--
TFWBWY...A
|
by: Olivier BESSON |
last post by:
Hello,
I have a web service of my own on a server (vb.net). I must declare it with
SoapRpcMethod to be used with JAVA.
This is a simple exemple method of my vb source :
>************************************************************************
> <WebMethod(), System.Web.Services.Protocols.SoapRpcMethod()> _
> Public Function HelloWorld() As
> <System.Xml.Serialization.SoapElementAttribute("return")> String
|
by: pumaken68 |
last post by:
Does anyone has experience with calling web service from pocket pc 2003
project in VS 2005 environment?
I just migrated a smart device(pocket pc 2003) solution from VS 2003 to VS
2005. There are 3 projects inside solution: 1. pocket PC 2003 windows form
project; 2. Business rules 3. a web service which will be used to download
and upload data via wireless from/to backend database.
After converted and built successfully, the web service...
|
by: tshad |
last post by:
What would be a good way to check programmatically whether a service was
running?
We have a service that dies periodically and I need to check to see if this
service is running. I know how to check to see if the status is in stopped
or running mode. But that doesn't tell me if it is actually running.
I need to know this so that if it happens I can programmatically start the
same service on another machine.
| |
by: John Wolff |
last post by:
I’m trying to upload a file to a Web Service. I have to submit the file
using a standard HTML form with the <input type=“file” /tag. Ultimately,
we are submitting the file from a Flash 8 application that uses Macromedia’s
flash.net.FileReference class. The FileReference class behaves like a
standard HTML form with the file input tag.
I know there are other options for submitting files through Web Services,
but we’re not able...
|
by: jsoques |
last post by:
Hello, I created a Web Service using .Net 2.0 that has a function that
returns a DataTable. I can test the function from the web page when I access
the .asmx from a browser on localhost and it works. I can also test the
function using VB6 and the xmlhttp activex object. The problem I have now is
when using VS 2005 or VB.Net 2005 Express and creating a web references is
that the proxy created doesn't map the function as returning a DataTable...
|
by: John |
last post by:
Hi
I have a winform app that uses a timer to periodically run a number of
queries on an access db and write the results in a rich text control on the
form. I have two questions;
1. If I am to convert this app into a service app what changes do I need to
make?
2. Is installing a service in vs 2005 any easier than it used to in vs 2003?
|
by: Ben |
last post by:
I'm trying to access a c# web service from a web form.
I set up the web reference proxy object as follows:
proxy.PreAuthenticate = true;
proxy.Credentials = CredentialCache.DefaultCredentials;
but i get a 401 error. If I switch the IIS website from Integrated
Windows Auth to Anonymous, it works... but i want it to use windows
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |