Code:
Private Sub Form_Resize()
If Me.WindowState = vbMaximized Then
Me.WindowState = vbNormal
'Put your minimize to tray code here
End If
End Sub
Does that help?