Pause button

Oct 5, 2011 at 2:02 AM
Edited Oct 5, 2011 at 2:02 AM

The pause button is always disabled.

Are there specific steps I need to follow to enable Pause functionality?

Coordinator
Oct 5, 2011 at 4:36 AM
Edited Oct 5, 2011 at 4:37 AM

Your service should support the pause and continue functionality for this to work. You'll need to override those methods.

For instructions on this, you can see this article in the "Adding Features to the Service":
http://msdn.microsoft.com/en-US/library/zt39148a(v=VS.100).aspx

Alternatively, you can take a peek at the sample here: 
http://windowsservicehelper.codeplex.com/SourceControl/changeset/view/90edccd98240#DemoService%2fService1.cs

Oct 5, 2011 at 10:43 PM

This is what I have:

    public partial class Service1 : ServiceBase
    {
        public Service1()
        {
            InitializeComponent();
        }
 
        protected override void OnStart(string[] args)
        {
        }
 
        protected override void OnPause()
        {
            base.OnPause();
        }
 
        protected override void OnContinue()
        {
            base.OnContinue();
        }
 
        protected override void OnStop()
        {
        }
    }
Am I missing something?
Coordinator
Nov 9, 2011 at 11:01 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jul 24, 2012 at 8:48 PM

work item not found.