VB.NET disable fade-in for forms

前端 未结 3 531
忘了有多久
忘了有多久 2020-12-21 18:25

I want to disable the form fade-in effect for a window. I think I found the right function

 _
Private Sh         


        
3条回答
  •  北海茫月
    2020-12-21 19:23

    What works for me is

        If Environment.OSVersion.Version.Major >= 6 Then
            DwmSetWindowAttribute(Me.Handle, DWMWINDOWATTRIBUTE.DWMWA_TRANSITIONS_FORCEDISABLED, 1, 4)
        End If
    

    But that is just a guess. I am not sure if "1" stands for YES, and I am not sure if the length 4 is correct under all conditions. Having this confirmed would be great. Thank you!

提交回复
热议问题