我需要像Windows媒體播放器一樣創建系統托盤「面板」。 (不僅沒有圖標,但complette形式的按鈕,圖像等)VB.NET中的自定義托盤面板
這裏是WMP截圖:
是否有可能在VB.NET & 10場?
感謝和我的英語水平抱歉.. :)
我需要像Windows媒體播放器一樣創建系統托盤「面板」。 (不僅沒有圖標,但complette形式的按鈕,圖像等)VB.NET中的自定義托盤面板
這裏是WMP截圖:
是否有可能在VB.NET & 10場?
感謝和我的英語水平抱歉.. :)
實際上,你可以做樣的「托盤面板」的,這是不是很困難的。只需創建一個Form
對象並將其FormBorderStyle
屬性設置爲None
,這將允許您創建自定義邊框。然後,請執行下列操作:
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 ... ;-)
希望這會有所幫助,順便說一下,你的英語比你想象的要好!
您的圖片無效,但我想您正在尋找[** DeskBand **](https://msdn.microsoft.com/en-us/library/windows/desktop/cc144099(v = vs.85)的.aspx#desk_bands)。可悲的是,在.NET中做並不容易,並且需要P/Invoke知識。 –
謝謝!用這個名字('DeskBand')我找到了文檔。 :) – Martin