<p>Given this:</p>

<pre><code>Public Sub timReminder_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
    If DateTime.Now() &gt; g_RemindTime Then
        Reminders.ShowDialog()
        timReminder.Enabled = False
    End If
End Sub
</code></pre>

<p>I want to be able to say this (as I would in Delphi):</p>

<pre><code>timReminder.Tick = timReminder_Tick
</code></pre>

<p>But I get errors when I try it.</p>

<p>Does anyone know how I can assign a custom event to a timer's on-tick event at runtime in VB.NET?</p>

Use the 'AddHandler' and 'AddressOf' keywords to add a handler to the Tick event.
```
AddHandler timeReminder.Tick, AddressOf timeReminder_Tick
```