473,698 Members | 2,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

window service

Hello Everyone,

I have created a very simple window service. This window service in turn
is calling a function that exist in a windows form.
When I am trying to run this windows service. window service does not run
and start throwing error message.
Once I remove the windows form and put that same method in a class and call
that class from window service, It works. I was wondering is it possible to
run the window service that is calling a method in windows forms.

Thanks
Mar 15 '07 #1
1 1299
As far as I know you cannot put screen interactions in a service, because
services are started before a user logs in. Applications that do want user
interaction with their service, usually create seperate applications that
can be started besides the service, interacting with it.

"Vinki" <Vi***@discussi ons.microsoft.c omschreef in bericht
news:D5******** *************** ***********@mic rosoft.com...
Hello Everyone,

I have created a very simple window service. This window service in turn
is calling a function that exist in a windows form.
When I am trying to run this windows service. window service does not run
and start throwing error message.
Once I remove the windows form and put that same method in a class and
call
that class from window service, It works. I was wondering is it possible
to
run the window service that is calling a method in windows forms.

Thanks

Mar 15 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2497
by: Usman | last post by:
Hi I have a window service written in C#. I have another application that requires a lengthy process to be performed like taking backup. How can I make this lengthy process be performed by window service in such a manner that my application may invoke the process. Is there any way that I can call some method written in window service apart from Start, Stop, Pause etc from my application or firing some custom event to the window service...
4
7982
by: utkarsh | last post by:
Hi, I want to develop a Window Service in C# that should be capable of sisplaying the a icon in the window tray. Based on some logic in service, icon should be changed to some other color/image and I needed single click, double click event and context menu also on that tray icon to perform some other operation and show some window form.
4
17481
by: drodrig | last post by:
Hi. I am trying to close/kill all processes that show visible windows on Windows XP. So far I've created a script that uses win32gui.EnumWindows to iterate through all windows, check for which windows are visible, then send a WM_CLOSE message to the window to request that it closes. Of course, not all apps want to close nicely. At this point I need to use something like TerminateProcess to kill the app, but how do I find the process id...
4
7188
by: ianyian | last post by:
hi experts, im doing some staff bween th the aspx + MS Word.chellcheck, and and which running on my ypc is no problem ( windows xp , activation by ASPNET ), buts someshow when i try to deploy to server ( windows 2003 ) + IIS 6.0 , hen which giee the error = Object reference not set to an instance of an object.This method or property is not available because a document window is not active. and i have try to configure for the component...
7
8636
by: =?Utf-8?B?Vmlua2k=?= | last post by:
public void sendKeysTest() { Process myProcess = Process.Start(@"C:\winnt\system32\cmd.exe"); SetForegroundWindow(myProcess.Handle); if (myProcess.Responding) SendKeys.SendWait("{ENTER}"); else
2
2018
by: =?Utf-8?B?YW5hbmQga3VtYXI=?= | last post by:
Hi, We have a requirement where windows service application XX will be deployed on two servers that is load balanced. The windows service polls the file directory and performs some logic when the file is being copied to the UNC path. The window service uses FileSystemWatcher to perform file operations. How does it work when the window service on two servers is pointing to same file location. Are there any articles or can somebody please...
0
1911
by: henkya | last post by:
Language Used: C# Project Typed: Setup Project (for .NET Window Service) Hi Bump into this issue and seriously have a hunch that this is a bug in the .NET setup project. These are the scenario: - I have an existing Window-Service application written in C#, and was build following the general deploying Window-Service guideline (the Win-Service project has a Installer class that have ServiceProcessInstaller & ServiceInstaller that...
0
864
by: olanger | last post by:
Let me explain the scenerio, I have a window service that has timer and OnElapsed timer event I'm calling a method. This method process business logic and It's multi threaded. The problem...when the window service starts and you try to stop it by going to the window service and pressing stop, It won't. I'm getting a message "the service didn't respond in timely matter". When debuging the window service and pressing service stop the onStop event...
2
1734
by: gray d newbie | last post by:
Greetings All, This is my first time creating a Window Service and I am having this error message when I try to start my window service (currently known as Service1). Below is my code for Window Service and also the line which I suspected is the caused of the problem. Protected Overrides Sub OnStart(ByVal args() As String) Dim i As Integer i = Shell("\\202.186.196.128\c$\Inetpub\wwwroot\WebAdmin\Rewards\print.exe",...
0
8680
marktang
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9030
jinu1996
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...
1
8899
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,...
1
6528
isladogs
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...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
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
2
2335
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.