When a user double-clicks the OK button at design-time, an empty event handler is created. However, this handler needs the WithEvents keyword in the Designer of the form.