Click here to Skip to main content
15,904,638 members
Home / Discussions / C#
   

C#

 
GeneralRe: .Net Remoting problem Pin
sokettepower2-May-05 21:37
sokettepower2-May-05 21:37 
GeneralProperty grid tutorial Pin
Anonymous2-May-05 2:15
Anonymous2-May-05 2:15 
GeneralRe: Property grid tutorial Pin
Heath Stewart2-May-05 5:18
protectorHeath Stewart2-May-05 5:18 
GeneralJoinMulticastGroup Pin
udir2-May-05 2:06
udir2-May-05 2:06 
GeneralRe: JoinMulticastGroup Pin
leppie2-May-05 3:13
leppie2-May-05 3:13 
GeneralRe: JoinMulticastGroup Pin
udir2-May-05 3:40
udir2-May-05 3:40 
GeneralWindows Service Pin
kunalshah_19832-May-05 2:01
kunalshah_19832-May-05 2:01 
GeneralRe: Windows Service Pin
Heath Stewart2-May-05 5:30
protectorHeath Stewart2-May-05 5:30 
You'll want to extend the ServiceBase class that is documented[^] in the .NET Framework SDK. If you're using VS.NET, create a new Windows Service project. With your service open (you'll see a blank, yellow background (by default)), right click and select "Create Installer". This will add an installer project that'll let you easily install your service using the installutil.exe application that's installed into %windir%\Microsoft.NET\Framework\v[FrameworkVersion], where [FrameworkVersion] is the version of the runtime you want to use to install the service (any should work so long as you don't use obsolete or new types and members).

To handle the time issue, you'll need to use one of the various Timer classes in the .NET Framework. There are 3 of them and each is suited for different tasks (though with the right coding any will work).

Consider this, however: such a scheduler already exists on your system: the Task Scheduler. In your control panel you'll find this virtual folder which you can create tasks in to run certain programs (like a "beep" application for an alarm). You can also access this programmatically using the native ITaskScheduler[^] interface. It would be easier to just write a native application to use this COM interface and it's associated class, represented by CLSID_CTaskScheduler. You could interop these interfaces in managed code, but you'll either have to create them yourself or create a dummy IDL file to forward-declare the necessary interfaces, compile it with midl.exe, then create an interop assembly using tlbimp.exe that ships with the .NET Framework SDK (that VS.NET installs by default).

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft

[My Articles] [My Blog]
GeneralRe: Windows Service Pin
kunalshah_19832-May-05 18:23
kunalshah_19832-May-05 18:23 
GeneralRe: Windows Service Pin
Heath Stewart3-May-05 5:16
protectorHeath Stewart3-May-05 5:16 
GeneralCreate Folder on server Pin
Prerak Shah2-May-05 1:45
Prerak Shah2-May-05 1:45 
GeneralRe: Create Folder on server Pin
Heath Stewart2-May-05 5:21
protectorHeath Stewart2-May-05 5:21 
GeneralRe: Create Folder on server Pin
Judah Gabriel Himango2-May-05 5:22
sponsorJudah Gabriel Himango2-May-05 5:22 
GeneralSwitching User Controls with NavBar Pin
Anonymous2-May-05 1:44
Anonymous2-May-05 1:44 
GeneralRe: Switching User Controls with NavBar Pin
MoustafaS2-May-05 1:48
MoustafaS2-May-05 1:48 
GeneralRe: Switching User Controls with NavBar Pin
Anonymous2-May-05 2:20
Anonymous2-May-05 2:20 
GeneralHelp -- Tool Bar Control Pin
Umair Tariq2-May-05 0:49
Umair Tariq2-May-05 0:49 
GeneralRe: Help -- Tool Bar Control Pin
Dave Kreskowiak2-May-05 3:59
mveDave Kreskowiak2-May-05 3:59 
GeneralDecompile Pin
StephenMcAllister1-May-05 23:42
StephenMcAllister1-May-05 23:42 
GeneralRe: Decompile Pin
M.Waseem Chishti2-May-05 0:51
M.Waseem Chishti2-May-05 0:51 
GeneralRe: Decompile Pin
S. Senthil Kumar2-May-05 4:15
S. Senthil Kumar2-May-05 4:15 
GeneralListing Local Users/Groups Pin
Jaymz6661-May-05 23:35
Jaymz6661-May-05 23:35 
GeneralRe: Listing Local Users/Groups Pin
Jaymz6662-May-05 4:31
Jaymz6662-May-05 4:31 
GeneralProblem in double click event of datagrid Pin
joy_priyank1-May-05 23:22
joy_priyank1-May-05 23:22 
GeneralRe: Problem in double click event of datagrid Pin
Dave Kreskowiak2-May-05 3:56
mveDave Kreskowiak2-May-05 3:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.