StrataFrame Forum

StrataFrame App Running As A Windows Service

http://forum.strataframe.net/Topic26544.aspx

By Bill Cunnien - 3/19/2010

Is it possible to have the main application running as (or like?) a windows service? I'd like to have a menu in the system tray pop up a list of modules that can be opened--showing and hiding an item based on security access. Each module would basically represent a department and its corresponding functions.



Thanks!

Bill
By Bill Cunnien - 3/19/2010

I found a nifty way of handling this using a NotifyIcon and a ThemedContextMenu: http://www.developer.com/article.php/3336751.
By Greg McGuffey - 3/19/2010

Based on my very limited knowledge of windows services, I'd say that there is no reason you couldn't use the SF framework to build a service. However, since it doesn't necessarily run on the UI thread, you wouldn't have an program.cs to work with. I.e. you'd have to set datasources in the OnStart event of the service, and do any tear down in the OnStop. I guess what I'm saying is that the paradigm is different, but the tools could certainly be used.
By Dustin Taylor - 3/23/2010

Yep, you can totally use SF to build a service, Trent does it all the time. I never have, myself, but he tells me it is very easy (granted, he always says that Wink.)

However, based on Bill's description, I think the important part he was looking for was getting an icon to appear in the system tray, which he has already figured out by using .NET's standard NotifyIcon.

By Bill Cunnien - 3/23/2010

Ya...everything is easy for Trent. Except for curling. He just can't seem to get that sweeping thing down.



BigGrin