473,396 Members | 2,036 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,396 software developers and data experts.

[VB.NET 2005]form from service

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.
Or maybe somebody has another idea for this problem

Regards
Szafranr

Dec 4 '05 #1
5 2187
Try giving your service the ability to interact with the desktop.

"Szafranr" <sz********@SPAMpoczta.onet.pl> wrote in message
news:dm**********@news.onet.pl...
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.
Or maybe somebody has another idea for this problem

Regards
Szafranr

Dec 4 '05 #2
Hi,

I feel I should point out that it's very bad practice to do this anyway, and
in future versions of Windows (or potentially even service packs) Microsoft
may well prevent this behaviour. Having a service with any kind of GUI is a
big security hole, as that form essentially has all the privileges of the
user account the service is configured to run as - potentially SYSTEM, which
has more powers than even the Administrator.

My advice would be to partition your solution into two projects - one
service, one forms app. Have the forms app interact with the service using
remoting. Much safer :-)

Regards,
Alex
"Szafranr" <sz********@SPAMpoczta.onet.pl> wrote in message
news:dm**********@news.onet.pl...
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.
Or maybe somebody has another idea for this problem

Regards
Szafranr

Dec 5 '05 #3
Agreed.

"Alex Clark" <ho*******@community.nospam> wrote in message
news:Ob******************@TK2MSFTNGP11.phx.gbl...
Hi,

I feel I should point out that it's very bad practice to do this anyway,
and in future versions of Windows (or potentially even service packs)
Microsoft may well prevent this behaviour. Having a service with any kind
of GUI is a big security hole, as that form essentially has all the
privileges of the user account the service is configured to run as -
potentially SYSTEM, which has more powers than even the Administrator.

My advice would be to partition your solution into two projects - one
service, one forms app. Have the forms app interact with the service
using remoting. Much safer :-)

Regards,
Alex
"Szafranr" <sz********@SPAMpoczta.onet.pl> wrote in message
news:dm**********@news.onet.pl...
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.
Or maybe somebody has another idea for this problem

Regards
Szafranr


Dec 6 '05 #4
> My advice would be to partition your solution into two projects - one
service, one forms app. Have the forms app interact with the service
using remoting. Much safer :-)


I want to have access to event of my service this is why I think about form
from service.
How can I get access to service event by external form with use of remoting
technic?
(I don't use this never before)

Regards
Szafranr
Dec 6 '05 #5
Do you mean that you want to be able to show service state somehow? Like
running, or stopping?

Try building a separate application that sits in the system tray and
monitors the service state using the local SCM interface.

Something like the service control manager form SQL server.
"Szafranr" <sz********@SPAMpoczta.onet.pl> wrote in message
news:dn**********@news.onet.pl...
My advice would be to partition your solution into two projects - one
service, one forms app. Have the forms app interact with the service
using remoting. Much safer :-)


I want to have access to event of my service this is why I think about
form from service.
How can I get access to service event by external form with use of
remoting technic?
(I don't use this never before)

Regards
Szafranr

Dec 6 '05 #6

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

Similar topics

2
by: Radu | last post by:
Hi. I have created a service which watches a folder and if any text file is added to that folder runs a custom encryption scheme on it. I add a file in that folder, and it works fine. However, when...
2
by: ingmar | last post by:
Hi, how do I register my Mouse wheel handler in my main VB .net 2005 form? My function Private Sub Me_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)...
0
by: RAM | last post by:
Hello, I am learning SQL Server and I would like to ask you a question: what are applications of Service Broker? I would like to know in what puproses it can be used in database systems. Thank...
2
by: Spam Catcher | last post by:
Hi all, Anyone know when Service Pack 1 for VS.NET 2005 is going to be released? I have a bunch of problems with 2005 - from crashing (after detaching from a ASP.NET debugger) to Winforms not...
8
by: Ryan | last post by:
Ok.. I have a form with lots of stuff on it; a tool strip panel, menu strip, data binding elements (dataset, binding source, table adapter), tab control with 7 tab pages, each page contains a...
29
by: Mark Rae | last post by:
http://msdn.microsoft.com:80/vstudio/support/vs2005sp1/default.aspx 1) This is big - nearly 500Mb 2) If you have WAP installed, you must uninstall it first - WDP doesn't need to be uninstalled...
0
by: admin | last post by:
biz.yahoo.com/prnews/070219/sfm012a.html?.v=1 Microsoft Corp. today released Microsoft® SQL Server 2005 SP2, an update to its award-winning data management and analysis platform. Customers can...
0
by: =?Utf-8?B?S2FybCBQb3RoYXN0?= | last post by:
According to this page Crystal Reports for Visual Studio 2005 Service Pack 1 should be released soon. Does anyone know the exact release date for this? ...
5
by: Bob | last post by:
Hi, I have some very simple code that I have been using for quite a while that uses a streamwriter to write to a network file. I have never had any problems with it. I recently updated Visual...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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,...
0
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
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...
0
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
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
agi2029
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 project—planning, coding, testing,...
0
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...

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.