How to detect a form being minimized on Windows 10

powerade661 0 Tallied Votes 365 Views Share

Hey guys, does anyone know how to do this? Here is my current code that will not work. I have tried everything that I know how to make this work to no avail. This is under form1_load. Any help would be awesome. Thanks in advance.

Dim f As Form
        f = sender
        If f.WindowState = FormWindowState.Minimized Then
            Me.Hide()