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 5 2202
Try giving your service the ability to interact with the desktop.
"Szafranr" <sz********@SPA Mpoczta.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
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********@SPA Mpoczta.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
Agreed.
"Alex Clark" <ho*******@comm unity.nospam> wrote in message
news:Ob******** **********@TK2M SFTNGP11.phx.gb l... 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********@SPA Mpoczta.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
> 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
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********@SPA Mpoczta.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 I add a
second file I have a run-time error on my "openfile" line, saying that
the file is in use by another process (of course, Explorer, which I use
to copy the file in the watched folder). The same thing happens when I
copy a series of files...
|
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) Handles Me.MouseWheel
never gets called. What do I need to do to tell VB that this function
should handle the mouse wheel event?
|
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 you very much for you answers
/RAM/
|
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 loading up correctly.
|
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 picture box, lots of text boxes (for
input).. you get the idea. All of a sudden everything on the form has
disappeared, it looks like a blank, newly created form. I can still get to
the properties of every item on the form using the drop-down box in...
| |
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
3) It will almost certainly take over an hour to install!!!
|
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 now take advantage of enhancements in the familiar and
easy-to-use Windows Vista operating system and 2007 Microsoft Office
system to easily connect and integrate with the power, security and
reliability of SQL Server 2005.
===
|
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?
http://support.microsoft.com/default.aspx/kb/928957
***from article****
Crystal Reports for Visual Studio 2005 Service Pack 1:
Crystal Reports for Visual Studio 2005 Service Pack 1 will be released in
Spring 2007. The service pack will increase the overall quality of the
existing...
|
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 Studio 2005 with
Service Pack 1 and now it gives me the "Directory not found "
exception when I try to write to a network location. I am running it
on Vista as a standard user. However, I have opened Visual Studio
using the "run as...
|
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,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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: 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: 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();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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.
| |