0

I am designing an app which basically is going to check for new data, my initial thought for this is to use a windows service. If i get any new data i need to display a winforms app which i'll populate with this data so that the user can acknowledge it.

I know there are restrictions running UI apps from a service so i'm just wondering what others believe is the best approach for both. Also i need to run this on XP

  • The timer that gets the data
  • how to launch the WinForms App

As im writing this i've also been toying with the idea of using a console app but nothing seems to be fitting together in terms of functionality.

JazziJeff
  • 721
  • 4
  • 17
  • 35
  • 2
    Instead of a Windows Service, perhaps have an app that lives in the system tray and performs its periodic checks for data with a timer? When there's a need to notify the user, use a system tray notification. From there a form can be displayed when the user clicks on the tray icon. – David Jan 23 '14 at 17:25
  • A very similar question was asked here... http://stackoverflow.com/q/418119/1246574 – Jim Jan 23 '14 at 17:27
  • @Jim Right, Jim. And even if it's not an exact dupe, it's full of useful Q&A about what OP is proposing. Not a straightforward thing to do, and full of potentially strange behavior. – DonBoitnott Jan 23 '14 at 17:39
  • ok some good suggestions here - think i slightly over engineered this a bit in my head but ive gone with form minimised to sys tray, desktop alert when new info and then show form when user clicks on desktop alert, works a treat :) thanks guys! – JazziJeff Jan 24 '14 at 11:29

1 Answers1

0

You can use a regular Winforms app. As soon as the application loads, hide the entry form from within the Form_Load method, this will keep the form hidden from the user. Keep a timer on the entry form that frequently checks for relevant data and pops up windows as and when required.

Abhinav
  • 2,085
  • 1
  • 18
  • 31
  • 1
    I would be quite irritated to know that there is an app running that I simply cannot see. Better to park it in the system tray as a means of "hiding" it. – DonBoitnott Jan 23 '14 at 17:31
  • went for a combo of both ideas :) i'll mark this as the answer though and give @DonBoitnott some heat – JazziJeff Jan 24 '14 at 11:30