How to enable the windows minimize to the taskbar animation in a VB.net form with borderstyle set to None?

lironlee 0 Reputation points
2023-02-20T13:11:49.2866667+00:00

How to enable the windows minimize to the taskbar animation in a VB.net form with borderstyle set to None?

Developer technologies | VB
Developer technologies | Visual Studio | Other
{count} votes

2 answers

Sort by: Most helpful
  1. DevJow 0 Reputation points
    2023-02-20T17:07:52.0666667+00:00

    you must add a new button or add:

    Public Class Form2
    
        Public Sub NameMethod()
           
            ' minize form
            Me.WindowState = FormWindowState.Minimized
    
        End Sub
    
    End Class
    
    0 comments No comments

  2. Jiachen Li-MSFT 34,221 Reputation points Microsoft External Staff
    2023-02-21T06:31:23.5+00:00

    Hi @lironlee ,

    There are two solutions that can be considered.

    1. The simpler way to do it is setting the FormBorderStyle back to Sizable just before a Minimize , and then back to none aftewards.
    2. Use the AnimateWindow function instead.

    Best Regards.
    Jiachen Li
    ----------
    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.