thank you emil for the updated example, and i now have bassbox working.
One thing i cant get working is resizing a winamp visualisation. When the size of the panel needs to change, i dont know how to get the visualisation to resize. Using BASSVIS_Resize() works with the other plugins but not winamp ones.
Secondly, for fullscreen mode i know you said it can be acheived by double clicking on the panel, but in some cases i want to switch programmatically.
your should create a tmp variable for BASSVIS_PARAM in resize event
Dim myVisParam As BASSVIS_PARAM
----
Case BASSVISKind.BASSVISKIND_WINAMP
----
myVisParam.VisHandle = Panel.Handle
myVisParam.Kind = BASSVISKind.BASSVISKIND_WINAMP
' Not the some as myVisParam.VisHandle
If mVisParam.Vishandle <> 0 Then
BassVis.BASSVIS_Resize(myVisParam , 0, 0, Panel.Width, Panel.Height)
now the plugin self should resize to your container when resize panel
that is only for Winamp all other Plugin to work like normal methode
' use default declare Param "mVisParam"
Case BASSVISKIND_SONIQUE, BASSVISKIND_BASSBOX
If mVisParam.Vishandle <> 0 Then
BassVis.BASSVIS_Resize(mVisParam, 0, 0, Panel.Width, Panel.Height)
but in some cases i want to switch programmatically.
Not understand what your mean
i have programming BassVis for Winamp Plugin like Winamp self
so you can interact with him
Fullscreen.. see Winamp! work for plugin like you use doubleclick on the visualization Window
also what your whant to do? exactly so i can help..
Hmm is that what your want?
Private Sub btnAMPFullScreen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAMPFullScreen.Click
Dim nRect As Win32Api.Rect
If mVisParam.VisHandle <> 0 Then
' turn Window Handle
If myVisParam Is Nothing Then
myVisParam = New BASSVIS_PARAM(BASSVISKind.BASSVISKIND_WINAMP)
End If
myVisParam.VisHandle = picPlgSource.Handle
' Set Fullcreen or not
FullScreen = Not FullScreen
If FullScreen Then
'Set Picturebox invisible befor resize
picPlgSource.Visible = False
Win32Api.GetWindowRect(Win32Api.GetDesktopWindow, nRect)
' Set VisPort to DesktopWindow
BassVis.BASSVIS_SetVisPort(mVisParam, _
picPlgSource.Handle, _
Win32Api.GetDesktopWindow, _
0, _
0, _
nRect.Right, _
nRect.Bottom)
' SetOnTop
Win32Api.SetWindowPos(picPlgSource.Handle, HWND_TOPMOST, 0, 0, 0, 0, _
Win32Api.SWP_NOACTIVATE Or Win32Api.SWP_NOSIZE Or Win32Api.SWP_NOMOVE)
' deactivate all input events for the Picturebox in Fullscreen mode
picPlgSource.Enabled = False
' now resize Winamp plugin to new resolution
BassVis.BASSVIS_Resize(myVisParam, 0, 0, nRect.Right, nRect.Bottom)
' show the Picturebox so you can see the visualization after resize
picPlgSource.Visible = True
Else
' move Picturebox on original position
picPlgSource.Width = 338
picPlgSource.Height = 240
' set VisPort back to Me
BassVis.BASSVIS_SetVisPort(mVisParam, _
picPlgSource.Handle, _
Me.Handle, _
483, _
15, _
picPlgSource.Width, _
picPlgSource.Height)
' NoTopMost
Win32Api.SetWindowPos(picPlgSource.Handle, HWND_NOTOPMOST, 0, 0, 0, 0, _
Win32Api.SWP_NOACTIVATE Or Win32Api.SWP_NOSIZE Or Win32Api.SWP_NOMOVE)
' enable Picturebox so you has the input interact with Winamp Plugin again
picPlgSource.Enabled = True
' Resizing Winamp Plugin
BassVis.BASSVIS_Resize(myVisParam, 0, 0, picPlgSource.Width, picPlgSource.Height)
' refresh my Application Window
Me.Refresh()
End If
End If
End Sub
you can use this for Keys or other programmatically

i think is not a good way manipulate interact with the plugins
greets