I can't seem to get one of my functions to work based on a timer. Every tick of the timer, I'm trying to call a function which will start periodically taking screen shots until the 'Finish' button is pressed. However, I've run into numerous errors and wondered if anyone could give me any insight or suggestions. Here is what I have so far...
One of the errors included "Public Sub RunAC() does not have the same signature as delegate". This might be really obvious, I'm a recent Computer Programmer / Analyst graduate with intermediate VB.net experience. Any help is appreciated.Code:Public Class Form1 Dim ssTimer1 As Timer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.ssTimer1.Enabled = False End Sub Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click ssTimer1.Interval = 10000 ssTimer1.Enabled = True AddHandler ssTimer1.Tick, AddressOf RunAC End Sub Public Sub RunAC() < yata yata yata code code code> End Sub End Class




Reply With Quote