473,320 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 3996
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
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
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
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
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
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
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
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
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
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
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
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.