Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2008

Tip: Looking for answers? Try searching our database.

windows form in service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Raan - 08 Feb 2008 15:40 GMT
hi all,

i am creating a windows service. i have created a windows form on the
same.

when i logout the windows form get closed. Is it possible to only hide
the form at the time of logoff.

i want that my form remains till the windows service is not stopped

regards,
raan
Herfried K. Wagner [MVP] - 08 Feb 2008 16:15 GMT
"Raan" <raan0101@gmail.com> schrieb:
> i am creating a windows service. i have created a windows form on the
> same.
[quoted text clipped - 3 lines]
>
> i want that my form remains till the windows service is not stopped

Services typically do not have a UI for security reasons.  Instead of adding
your form to the service, write an autostart client applications which
contains the user interface and interacts with the server via IPC
meachanisms such as sockets, named pipes, remoting, WCF, ...

Signature

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

Mr. Arnold - 09 Feb 2008 13:11 GMT
> hi all,
>
[quoted text clipped - 3 lines]
> when i logout the windows form get closed. Is it possible to only hide
> the form at the time of logoff.

I know there is a namespace System something that allows a Windows Desktop
solution to check for logout on the desktop,  and it will raise an event in
the running .Net solution. I am sorry. I cannot remember what System
namespace, maybe Diagnostics. But I know it's there and you can use it.

I know I saw this when I was using Google to search out  another .Net
solution.

> i want that my form remains till the windows service is not stopped

You may be able  to use an OnCustomeCommnad() in the service. If the service
is not active when you call the Service's  OnCustomeCommnad() from your
Windows desktop solution, you should be able to dectec it on a try/catch,
which would be in the Logout event of that (Logout event)  I am talking
about. You're going to have to look for that feature in the .Net Framework.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.