|
Thankyou dave I understand that it is a regular application that has the UI not the service. But I need my application to come up while the system is booted. Could you give me a simple example like an application that displays a messagebox.
|
|
|
|
|
If there is no user logged in the login screen is yet another Desktop that is controlled by MSGINA.DLL.
If you're talking about starting your monitor app, all you have to do is put a shortcut to launch your app in All Users\StartMenu\Programs\Startup or put the command line to launch it under the Run key in Registry.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I want my application to be ran as a service or create a service for it. Like Norton Antivirus, you can see its service in the service window named 'Norton Antivirus Auto Protect Service'. I guess that's the service which which later brings up the application while the user is logged in you can see its icon in the system tray that enables you to have the user interface. I have the application that does this much but no service. How can I do that?
|
|
|
|
|
OK. You write two applications. One is a Windows Service that does whatever you need it to, and the other is the monitor application that is launched out of the Run key in the Registry. Everything in that key is executed every time someone logs in.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave can you explain it a little more breifly. Do you mean that the Service is intended to execute the Application? How do I make an application that can be launched out of the Run key?
|
|
|
|
|
tonymathewt wrote: Do you mean that the Service is intended to execute the Application?
No. The service doesn't do anything other then its job. It shouldn't care if anyone is logged in or not. The application is launched, as I said, out of the Registry Run key when a user logs in and communicates with the service either through sockets or .NET Remoting. That application is responsible for communicating the status of the service with the user and passing user commands to the service.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
The service should check whether a few of the sites are up or not and it should be able to access a local and a remote database. Will it be possible? And how do I launch an application out of the Registry Run key?
|
|
|
|
|
tonymathewt wrote: The service should check whether a few of the sites are up or not and it should be able to access a local and a remote database. Will it be possible?
Of course. So long as you understand how Services work. How you write your code depends on your definitions of "local" and "remote" and what DB engine your using for those databases.
tonymathewt wrote: how do I launch an application out of the Registry Run key?
All you have to do is supply the command line to launch your application. I'm pretty sure you can figure it out if you just look at what's already in there.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thankyou very much dave. I have quite understood the run registry key. I am not quite aware of .NET remoting required for communication b/w the application and the service. I think I can easily handle it.
|
|
|
|
|
tonymathewt wrote: But how can you say that a window service is not supposed to have a user interface while Norton Antivirus does have one.
If you examine what Norton Antivirus actually does, I am quite sure that you will find that it's not the service that has the user interface, but a regular program that monitors the service.
---
Year happy = new Year(2007);
|
|
|
|
|
Thankyou Guffa. Any idea how to write a regular program that monitors the service say like Norton Antivirus. I want my application to come up while the system is booted up. Could you give me a simple example like an application that displays a messagebox.
-- modified at 21:57 Thursday 18th January, 2007
|
|
|
|
|
You can use the System.ServiceProcess.ServiceController class to monitor a service. In the documentation you will find several examples.
Put a shortcut to your program in the Startup folder in the Start menu to make it start when you log in. There is also somewhere in the registry that you can add a key for the same effect.
---
Year happy = new Year(2007);
|
|
|
|
|
Hi,
When I say, "sn" at cmd prompt, its giving me all the options as it is working nice. But when I say that "sn -k D:\Aleem\AleemDSO.snk" at command prompt its giving me error as "Failed to generate a strong name key pair -- The keyset is not defined." what may be the error from my side.
Due to power fluctation my system has been stopped without proper shutting down. Is this may be the reason or any thing else. Before that it was working fine. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Do you have write permissions in that directory?
|
|
|
|
|
Hey,
I'm using a property grid control to display some user options for my applications. So, basically I have a big Settings class with all the properties associated with the property grid control and then the user can just change them.
However there's a help frame in the property grid control and I'd like to be able to display some help text in there for each property : pretty much as Visual Studio does.
Can someone help please?
Thanks
Allad
PS : if you know of an easy and prettier class for options dialogs in C#, I'm all ears.
----
Navigator - Your best alternative to Windows Explorer
|
|
|
|
|
You can use the DescriptionAttribute[^] class to set the text of the "help frame" of a property grid. In addition, you can use the CategoryAttribute[^] class to group related properties within the grid.
-Phil
|
|
|
|
|
thanks a lot. It's working perfectly. Is it some kind of hack? It doesn't look like usual C# syntax.
Anyway, It is exactly what I'm looking for.
----
Navigator - Your best alternative to Windows Explorer
|
|
|
|
|
Nope, no hacks required. It was designed to look that way. It's C# attribute[^] syntax. .NET allows you to attach additional bits of "metadata" to .NET objects (assemblies, classes, methods, and properties). Other .NET objects (such as the PropertyGrid) can then extract that data for their own purposes (such as displaying descriptions of properties).
-Phil
|
|
|
|
|
Wow. Thumbs Up man. you got to be some kind of C# guru to know all that stuff.
Thanks a lot for your time. Now I may sleep with a better conscience.(I don't really like using hack stuff when I can help it).
Regards,
Allad
----
Navigator - Your best alternative to Windows Explorer
|
|
|
|
|
I want to make a power point slide using this assembly Microsoft.Office.Interop.Graph I see many objects and details in this Graph Object
where can I see examples or description about this object to use it in my program
Idrees
La ilaha illAllah
|
|
|
|
|
|
Hello All
we have a system only accept pdf files with 1.4 version, and so we have to develop a utility to verify a pdf version of a gived pdf file before saving the pdf file into that system.
Currently, we need a pdf library which it could open a pdf file and get the pdf version information. if the library include version conversion function will be a big help for us.
Thanks
Jacob
|
|
|
|
|
Hi!
The PDF-Version is listed in the header of the PDF-File. You could just open a stream, read in the first couple of bytes and then compare the version signature with what you want to make sure and that's it.
Would be like 7 lines of code and not library needed.
Regards,
Stevie
Greetings,
Stephan Eberle
hawke@deltacity.org
|
|
|
|
|
Hello Stephan
Thanks you very much!
as you said, the first line of the pdf file kept the pdf version info.
%PDF-1.5, means the version of the pdf file is 1.5.
%PDF-1.4, means the version of the pdf file is 1.4.
Jacob
|
|
|
|
|
You're welcome!
Greetings,
Stephan Eberle
hawke@deltacity.org
|
|
|
|