I'm trying to build a little program, but nothing I do seems to work. So I'm using this as a sort of last resort.
1) I'd like the program to start minimized to the system tray. [Haven't gotten to this yet. but help with it would be appreciated if you have help to offer.]
2 I'd like the program to have a continuously looping timer of 1 hour.
3) And the end of each 1 hour interval I want two things to happen:
a) a certain process is stopped.
b) a program is executed.
I'm a complete coding novice, so all my attempts to piece something together from bits learned off of various tutorials have failed. Here's what I got so far:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Enabled = True 'Timer set to 10 seconds for testing.
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Shell("taskkill -f process.exe") 'Kill a program. The -f option will force it to end.
Shell("explorer program.exe") 'Start a program.
When I start the program up, all it does it sit there. No process stopped, or program started. Is it because I'm on windows 7 or something else? Any help would be appreciated.