What I like to do is use a UserControl rather than a picturebox.
Create a usercontrol and add the following properties
VB Code:
Option Explicit
Private Sub UserControl_Initialize()
UserControl.BackStyle = 0
End Sub
Public Property Get MaskColor() As Long
MaskColor = UserControl.MaskColor
End Property
Public Property Let MaskColor(ByVal New_MaskColor As Long)
UserControl.MaskColor() = New_MaskColor
PropertyChanged "MaskColor"
End Property
Public Property Get Picture() As Picture
Set Picture = UserControl.Picture
End Property
Public Property Set Picture(ByVal New_Picture As Picture)
Set UserControl.Picture = New_Picture
Set UserControl.MaskPicture = New_Picture
PropertyChanged "Picture"
End Property
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
UserControl.MaskColor = PropBag.ReadProperty("MaskColor", vbWhite)
Set Picture = PropBag.ReadProperty("Picture", Nothing)
End Sub
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("MaskColor", UserControl.MaskColor, vbWhite)
Call PropBag.WriteProperty("Picture", Picture, Nothing)
End Sub
Now to use it, draw it onto your form, let's call it MyControl
VB Code:
MyControl.MaskColor = vbWhite
Set MyControl.Picture = LoadPicture("whatever.gif")
If move over your existing controls you will see it has a transparent background