4

i need to create system tray "panel" like Windows Media Player. (not icon only, but complette form with buttons, images, etc.)

Here is wmp screenshot:

wmp

Is it possible in VB.NET & Win 10?

Thanks and sorry for my english.. :)

  • 3
    Your image doesn't work, but I suppose you're looking for a [**DeskBand**](https://msdn.microsoft.com/en-us/library/windows/desktop/cc144099(v=vs.85).aspx#desk_bands). Sadly it isn't very easy to do in .NET and requires P/Invoke knowledge. – Visual Vincent Aug 01 '17 at 10:52
  • THANKS! With this name ('DeskBand') i found documentation. :) – Martin Dřímal Aug 01 '17 at 11:11

1 Answers1

-2

You actually can do kind of a "tray panel", and it isn't quite difficult. Just create a Form Object and set its FormBorderStyle property to None, which will allow you to create your custom border. Then, do the following:

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

Once you've done that (I'm not sure it will work directly, try a bit and it should), enjoy designing the GUI... ;-)
Hope this helps and by the way, your english is better than you think!

  • 2
    Umm... I guess the asker meant like embedding the whole thing on the taskbar, like a... see this image I found in Google: https://images.techhive.com/images/idge/imported/article/ctw/2012/06/06/lenovo_battery_charging_popupnote-100378724-orig.jpg Maybe the asker is asking for one like that... – Sreenikethan I Aug 08 '17 at 15:21
  • Possible, however, I just thought my answer might have given him some help, I apologize in case it didn't! – The Indexer Aug 10 '17 at 11:23