Hi
I have a VB .NET Windows application that I would like to implement as a Windows service. Basically there are two scenario's:
1) The .exe file is executed normally. This is done manually and shows a Windows form, allowing the user to interact with the program
2) The .exe file is started with a parameter. In that case only some code is executed. No forms or dialogs are shown.
I would like the second type to be implemented as a service. As such I have two questions:
a) What is the best way to do this? Personally I would use srvany.exe to implement the .exe with the parameter as a service, but maybe there are newer (and better) ways nowadays?
b) How do you "loop" your code in VB .NET? If the .exe is started once (as a service) it should still perform the encoded algorithm regularly, e.g. every hour. So I assume that the entire code block needs to be put into a loop with a "sleep" at the end?
Thanks for any tips!
Tim
I have a VB .NET Windows application that I would like to implement as a Windows service. Basically there are two scenario's:
1) The .exe file is executed normally. This is done manually and shows a Windows form, allowing the user to interact with the program
2) The .exe file is started with a parameter. In that case only some code is executed. No forms or dialogs are shown.
I would like the second type to be implemented as a service. As such I have two questions:
a) What is the best way to do this? Personally I would use srvany.exe to implement the .exe with the parameter as a service, but maybe there are newer (and better) ways nowadays?
b) How do you "loop" your code in VB .NET? If the .exe is started once (as a service) it should still perform the encoded algorithm regularly, e.g. every hour. So I assume that the entire code block needs to be put into a loop with a "sleep" at the end?
Thanks for any tips!
Tim