Custom Tray Panel in VB.NET

I need to create a taskbar panel such as Windows Media Player. (not only an icon, but also a final form with buttons, images, etc.)

Here is a wmp screenshot:

wmp

Is this possible in VB.NET and Win 10?

Thanks and sorry for my english .. :)

+4
source share
1 answer

In fact, you can make a “tray panel”, and it’s not difficult. Just create an object Formand set its property to a FormBorderStylevalue Nonethat allows you to create your own border. Then follow these steps:

Public Class Form1
    Public Timer1 As New Timer
    Private Sub Form1_Load(sender as Object, e as Eventargs) Handles MyBase.Load
        Timer1.Interval = 1
    End Sub

     Private Sub Form1_MouseDown(sender as Object, e as MouseEventargs)
         Timer1.Start()
     End Sub

     Private Sub Form1_MouseUp(sender as Object, e as MouseEventargs)
         Timer1.Stop()
     End Sub

     Private Sub Timer1_Tick(sender as Object, e as Eventargs)
         Me.Location = New Point(Me.Cursor.Position.X - (Me.Cursor.Position.X - Me.Location.X), Me.Cursor.Position.Y - (Me.Cursor.Position.Y - Me.Location.Y))
     End Sub
End Class

( , , , ), GUI...;-)
, , , , , !

-2

Source: https://habr.com/ru/post/1682735/


All Articles