Search code examples
vb.netvlclibvlc

AxVLCPlugin2 always show toolbar VB.net


Im using AxVLCPlugin2. By default the toolbar auto hides. I would like for it to stay put. Cant find the right command if there is one. Im using VB.net Thanks


Solution

  • You notice how the toolbar stays on when you wave the mouse over the control? You can simulate that. Drop a timer onto your form, set it to, let's say default 100ms interval and enable it. Then put following code into Timer_Tick event handler:

    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        Dim curPos = Cursor.Position
    
        Cursor.Hide()
        Cursor.Position = New Point(Me.Left + MyAxVLCPlugin21.Left + 100 * Rnd(1), Me.Top + MyAxVLCPlugin21.Top + 100 * Rnd(1))
    
        Application.DoEvents()
    
        Cursor.Position = curPos
        Cursor.Show()
    
    End Sub
    

    What this does, every 100ms hides mouse cursor, moves it to a random position over VLC control, then returns back and unhides it. This happens unnoticed by user, but it does the trick - control receives mouse movement and toolbar stays.