|
You can achieve it via Reflection.
|
|
|
|
|
How to make IE7 look exactly like IE6
|
|
|
|
|
Try sqinting your eyes a little bit!
Or try the right forum (suggest: Web Development)
|
|
|
|
|
And not have tabs? Why?
I have IE7 set as close to being IE6-like as I know.
I would suggest this[^] site, but "Our site is currently under-going a makeover. Please return again in one or two days time."
|
|
|
|
|
Do you mean to make IE7 render the pages as IE6 does?
That is not possible.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hey,
I have a Windows Application which is working fine. Now what I need to do is implement it as Windows Service so that it gets launched each time machine is started.
Now that I am totally new to Windows service, can anybody please help me to create a windows service, which when started, launches the application.
Please revert as soon as possible
Thanking you in anticipation
|
|
|
|
|
|
Hey Simons,
Thank you for such a quick reply. I hv already gone through several tutorials including this CodeProject Tutorial.
I have created a simple windows service. I also have an windows application in place.
I need to know as to what needs to be done to launch that application when my service gets started.
Also inform me if any specific setting needs to b done
Thank you.
Awaiting yr reply
|
|
|
|
|
Like Dave says, you shouldn't be starting up GUI apps from a service.
Services are for doing processing in the background. They shouldn't have any GUI component, and shouldn't start any GUI apps.
If you want an app to auto start when windows starts, put a shortcut to it in the startup folder or add a reg key for it at HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ You should find subkeys for Run, RunOnce, RunServices, and RunServicesOnce listed here. Just add your program.
All the other regsitry locations and ini file options are listed here[^]
Simon
|
|
|
|
|
Hey,
Thank you yet again.
May be I could have put forth my problem in a better way.
I have a Windows Application in place. I want to implement this application as a Windows Service.
So can you please put some light on the possible ways to implement this......Windows Application as a Windows Service ?
Awaiting your reply
|
|
|
|
|
I think we are going round in circles here. I've given you links that explain how to implement a service. What are you having trouble with?
You can't just take a GUI app, run a wizard and convert it to a service. A service is a fundamentally different concept.
What exactly is it your app does, and what are you trying to do with it?
Simon
|
|
|
|
|
Simon Stevens wrote: I think we are going round in circles here. I've given you links that explain how to implement a service. What are you having trouble with?
You can't just take a GUI app, run a wizard and convert it to a service. A service is a fundamentally different concept.
What exactly is it your app does, and what are you trying to do with it?
Simon
Hi Simon,
I have read the tutorials at the links given by you. I thank you for that.
I am not saying that I want to run a wizard and convert application to service.
Let me put my problem straight :
I have a GUI based windows application. I want it to run when my windows service starts.
So it would be of great help if you could tell me the method(s) to do this.
Thank You.
Regards......
|
|
|
|
|
A windows service shouldn't run GUI components. A windows service should never do anything in the GUI.
Why do you want to run your GUI app when your service starts?
Simon
|
|
|
|
|
Simon Stevens wrote:
A windows service shouldn't run GUI components. A windows service should never do anything in the GUI.
Why do you want to run your GUI app when your service starts?
Simon
My application does the work of sensing the temperature. So I want to start it as soon as the machine starts even before the user logs in. So, I am implementing the application as a windows service
Can you at least hint me as to how I can implement, say for example an application without GUI, as a windows service ?
Believe me, I have seen GUI based application implemented as a Windows service......but don't know the settings (if any) that need to be done
Regards......
|
|
|
|
|
Windows services should not have GUIs. XP does not allow it by default, and Vista blocks it totally. I've never seen a GUI app running as a service, and I would suspect what your thinking is a service actually isn't.
What you should do is this.
Write a windows service that monitors the temperature. Then write a separate GUI app that communicates with the service to display the information to the user, and allow them to change any settings you want.
To write the service, you just follow the tutorials. You have to implement the various OnStart(), OnStop(), OnSuspend() methods. Your OnStart() method should create any required objects and begin taking the temperature readings. For example, it could create a Timer that triggers a temperature reading every second maybe. In the OnStop() method you need to stop your timer and dispose of anything that needs clearing up.
You then write a separate GUI app that the user can run from the start menu. This communicates with the service (You can use .net remoting, or WCF, or whatever you fancy) to retrieve the temperate from the running service and display it to the user. If you need to GUI app to run as soon as windows starts you can put a link in the startup folder, or add a registry key in the places I've already mentioned.
This way you have a service doing the temperature logging, so can be logging from as soon as windows is on, before the user logs on. And you have a GUI app to display the info to the user that they control and isn't running as a service.
Simon
|
|
|
|
|
Hey Simon,
This seems to be a good solution. However, due to some time constraints, I am not too sure whether I'll be able to follow the same.
Can you give me an idea whether it is possible to run executable file (of the application) from the OnStart() method......may be using Process.Start() or some other way you think would be better ?
And if yes, how?
Regards..
|
|
|
|
|
queries365 wrote: This seems to be a good solution
It's better than a good solution. It's the right solution.
What you want to do is a bad idea. Firstly, as both me and Dave have explained, you should not be doing GUI stuff from a service. At all, and that includes calling other .exe files to display a GUI.
I strongly recommend that you take the time to do it properly now. Time spent up front doing things properly nearly always saves time in the future fixing all the problems. What you're basically saying is that you can't be bothered to do it properly, so you just want to hack out a bad version now.
I could be an arse and tell you it's not possible.
It is though.
But I don't recommend it.
In the right click on the service, and click properties, on the "Log on" tab, set the "log on as" to use the "local system account", and tick the "allow service to interact with desktop" check box. Now you can display a GUI to the user. So yes, just use Process.Start to call your exe and break all the good UI design guidelines I can think of.
I really recommend you do it properly though.
This only works on XP. Vista redirects services to a alternative secure desktop which the user doesn't see.
Simon
|
|
|
|
|
You should not be putting any kind of user interface in a service. You should be creating two seperate applications. One would be the service that does all of your work, and the other would be the user interface portion that, obviously, exposes the user interface and talks to the service over some communication method.
|
|
|
|
|
Dave Kreskowiak wrote: You should not be putting any kind of user interface in a service. You should be creating two seperate applications. One would be the service that does all of your work, and the other would be the user interface portion that, obviously, exposes the user interface and talks to the service over some communication method.
Hey Dave,
Thank you so much for a quick reply.
I am not putting any UI in the service.
What I have done until now is that I have created a simple Windows Service with not much coding done in it by me. I have another Windows Application in place.
What I need to know is the way to launch that application when my service starts.
What is the way to make them communicate so that application gets launched when service starts
Also let me know if any specific settings need to be done
Awaiting your reply
Thank you so much
|
|
|
|
|
queries365 wrote: What I need to know is the way to launch that application when my service starts.
Since the service starts before a user can even log in, you DON'T do this. That application you want to start should be started either out the Run key in the Registry, or from either All Users\StartUp or the individual Startup folder.
|
|
|
|
|
Dave Kreskowiak wrote: queries365 wrote:
What I need to know is the way to launch that application when my service starts.
Since the service starts before a user can even log in, you DON'T do this. That application you want to start should be started either out the Run key in the Registry, or from either All Users\StartUp or the individual Startup folder.
By saying "the way to launch", I mean while writing the service, what is the coding that I need to do......may be regarding registry or startup folder as you suggested or something else.
Basically, I have a Windows Application which I need to implement as a Windows Service. I hope this will help you in understanding my problem better.
Thank you yet again.
Awaiting your reply
|
|
|
|
|
Services do not expose a user interface - it's as simple as that.
queries365 wrote: I mean while writing the service, what is the coding that I need to do
To do what?
|
|
|
|
|
Dave Kreskowiak wrote: Services do not expose a user interface - it's as simple as that.
queries365 wrote:
I mean while writing the service, what is the coding that I need to do
To do what?
To implement application as a service......
I have seen GUI-based application working as Windows service......Don't know what code needs to be written in OnStart() method. Or may b some settings I'm missing
Please at least hint me what to do for an application which is not GUI-based
Regards......
|
|
|
|
|
queries365 wrote: I have seen GUI-based application working as Windows service
Does that mean it's a good idea?? Nope.
The OnStart method is used to start your worker threads that do the actual work of the service. If you have no idea who threading works or how to start a thread, your dead in the water.
Services do not have a GUI because, 1, there is no message pump to drive form events, 2, the OnStart method only ever fires once in the life of a service, so there's no way to get a GUI going and keep it going, and 3, OnStart fires, even if theres noone logged into the machine! If there's noone logged in, there's no desktop to show the form on.
Yeah, it's possible to do, but you have to have advanced knowledge of services and how Windows works in order to pull it off. This is information that could cover and entire book and is well beyond the capacity of a few forum posts to explain.
|
|
|
|
|
Hi,
I am doing Installer. i want to add the Check Box Wizard i can able to add the Wizard .But, I am not able to Handle it . I mean How to write The code to handle CheckBoxes/Radio Button at the Time of Installing
Please send any link or code for handling Checkboxes at the time of Installing
|
|
|
|