How to detect a form being minimized on Windows 10

powerade661 0 Tallied Votes 363 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()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.