473,480 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Windows Service

Hi everyone! I can create Windows Service in VB .Net 2003 professional.
The problem is that when I try to show up a form in Service Start up
event, the form always show up and become stop responsible! Any idea?

Regards,
Stanley

Nov 21 '05 #1
5 4018
Do not show forms from a service. Services should never interact with the
desktop.
"Stanley" <xs******@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi everyone! I can create Windows Service in VB .Net 2003 professional.
The problem is that when I try to show up a form in Service Start up
event, the form always show up and become stop responsible! Any idea?

Regards,
Stanley

Nov 21 '05 #2
Thanks for reply! You mean that it's not impossible to make a windows
service interact with desktop?? I don't think so! Please help to with
the code, I think it's possible!!

Thanks again!

Nov 21 '05 #3
Stanley schrieb:
Thanks for reply! You mean that it's not impossible to make a windows
service interact with desktop?? I don't think so! Please help to with
the code, I think it's possible!!


It's possible, but it's bad design. Services can interact with the
desktop, but to do so, they have to run with the LocalSystem-Account.
This one can do everything with your system. The service window will
be shown at the users desktop and so, it can receive window messages
as any other desktop window. This can be used to attack the users PC.
Also, if your service runs under WinXP with fast user switching, the
service window will only be shown to the first logged on user.

The better approach is a separate client application, which runs with
user privileges and connects to your service through TCP-Sockets for
example.

Thorsten Dörfler
--
vb-hellfire - einfach anders
http://www.vb-hellfire.de/
Nov 21 '05 #4
"Stanley" <xs******@gmail.com> schrieb:
I can create Windows Service in VB .Net 2003 professional.
The problem is that when I try to show up a form in Service Start up
event, the form always show up and become stop responsible!


In addition to the other replies:

<URL:http://www.google.to/groups?selm=%249uYzKMtEHA.2896%40cpmsftngxa06.phx. gbl>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5
Ok, thanks all! ;-)

Nov 21 '05 #6

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

Similar topics

11
2223
by: Michael Riggio | last post by:
Is there a way to have a windows service instantiate a class that is a web service, which will then be accessible to clients via HTTP? Thanks, -Mike
1
5650
by: Artur Kowalski | last post by:
I have a NotifyIcon in my Windows Service project and I am trying to add a ContextMenu to this NotifyIcon or use some of the mouse events. Everything isn't working. I think so base class of the...
3
5106
by: belgiozen | last post by:
Hi, I have a working windows service,it is looking for files on the disk and when some of the files are cupdated it calls an executable. But it takes a lot of time(about 10 minutes) to run the...
2
2911
by: Neslihan ERDEM | last post by:
Every body Hi first of all I say Why do I need Windows Service / Every Day I create XML file . I writed a XML web service And .I join this servis Windows service. I create Windows Service that...
9
7221
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service...
3
2177
by: Nathan Kovac | last post by:
I have a feeling I am missing something simple, but I just can't find it. Perhaps someone can give me a lead on where to look. I will describe the issue then post my code to the web service. My...
3
3661
by: Doug Bailey | last post by:
I am trying to control a Windows Service via a Web Service interface. (I am developing in .NET2003) I am using the ServiceController object which allows me to read the state of the services with...
2
6874
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app...
5
4244
by: sonali_reddy123 | last post by:
Hello all, I am trying to develop an application which will run as a windows service. The application should have Normal options available with service like start, stop and pause but along...
5
3266
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
6905
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...
0
7041
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7080
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...
1
6736
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...
0
6908
tracyyun
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...
0
2994
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2980
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
561
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
178
bsmnconsultancy
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...

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.