Get the App
SLTechnology News&Howtos  ›  Development  › 

The basic concept of VB.NET notification control

Shulou Source: shulou.com Published: 2022-06-03 12:37:50 10月04日 Update

This article mainly introduces "the basic concept of VB.NET notification control". In daily operation, I believe that many people have doubts about the basic concept of VB.NET notification control. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "basic concepts of VB.NET notification control". Next, please follow the editor to study!

The VB.NET notification control consists of two basic classes:

A form (the part that will actually be displayed). A class that contains all the attributes that can be included in the form.

Class contains two timers, one to control the fading animation effect, and the other can be configured to define how long the pop-up window is displayed. Here is a demonstration:

FPopup.Size = Size

FPopup.Opacity = 0

FPopup.Location = _ New

Point (Screen.PrimaryScreen.

WorkingArea.Right_-

FPopup.Size.Width-1

_ Screen.PrimaryScreen.

WorkingArea.Bottom)

FPopup.Show ()

Form finishes drawing in the Paint event. The author uses the following function to get a lighter / darker color than the specified color, but is not sure if there is a better way.

Private Function GetDarkerColor ()

Function GetDarkerColor (ByVal

Color As Color) As Color

Dim clNew As Color clNew =

Drawing.Color.FromArgb (255)

DedValueMin0 (CInt (Color.R), _

Parent.GradientPower), DedValueMin0

(CInt (Color.G), _ Parent.GradientPower)

DedValueMin0 (CInt (Color.B), _

Parent.GradientPower))

Return clNew

End

Function

To avoid flickering: Me.SetStyle (ControlStyles.

OptimizedDoubleBuffer, True)

Me.SetStyle (ControlStyles.

ResizeRedraw, True)

Me.SetStyle (ControlStyles.

AllPaintingInWmPaint, True)

How to implement a method of hiding form for VB.NET Notification Control

In the PopupNotifier.vb class, add:

Sub Hide () Sub Hide () tmWait.Stop () tmAnimation.Start () End Sub

Call in form as follows:

Private Sub PopupNoti

Fier1_Close ()

Sub PopupNotifier1_Close ()

Handles PopupNotifier1.Close

PopupNotifier1.Hide ()

End Sub

At this point, the study of "the basic concepts of VB.NET notification controls" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Controls concepts learning methods two more colors help practical deeper next events functions animation available in actual properties effects articles theory Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Redmi MySQL Shulou Technology Linux