Hi all, I'm trying to bring a transparent user control (being used as a drawing layer) to the front, over a page that will be playing video. Me.BringToFront() didn't seem to work, and when I tried Me.SetTopLevel(true) in the load, this gave me an InvalidOperationException. Here's what I have so far, sorry for the commented lines.. lots of trial and error (I'm very new, just an intern at the moment)

Code:
Imports System.Runtime.InteropServices

Public Class ucDrawingSurface
    Dim myBrush As New SolidBrush(Color.Blue)
    Dim myPen As New Pen(myBrush, 8)

    Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
        Dim g As Graphics = e.Graphics
        g.DrawLine(myPen, 0, 0, Me.Height, Me.Width)
        ' Me.BringToFront()
    End Sub

    Private Const WS_EX_TRANSPARENT As Int32 = &H20

    Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Int32, ByVal dx As Int32, ByVal dy As Int32, ByVal cButtons As Int32, ByVal dwExtraInfo As Int32)


    Private Const MOUSEEVENTF_LEFTDOWN As Integer = &H2
    Private Const MOUSEEVENTF_LEFTUP As Integer = &H4
    Private Const MOUSEEVENTF_RIGHTDOWN As Integer = &H8
    Private Const MOUSEEVENTF_RIGHTUP As Integer = &H10

    Public Sub DoMouseClick()
        Const zero As Integer = 0
        Const one As Integer = 1
        Dim x As Int32 = Cursor.Position.X * 65535 / System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width
        Dim y As Int32 = Cursor.Position.Y * 65535 / System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height
        mouse_event(MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, x, y, zero, one)
    End Sub

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()


        ' This allows the control to be transparent
        Me.SetStyle(ControlStyles.SupportsTransparentBackColor, True)
        Me.UpdateStyles()
        Me.BackColor = Color.Transparent

    End Sub

    Protected Overrides ReadOnly Property CreateParams() As CreateParams
        Get
            Dim cp As CreateParams = MyBase.CreateParams
            cp.ExStyle = cp.ExStyle Or WS_EX_TRANSPARENT

            Return cp
        End Get
    End Property

    Protected Overrides Sub OnPaintBackground(ByVal e As PaintEventArgs)

    End Sub

    Private Sub ucDrawingSurface_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'Control.CheckForIllegalCrossThreadCalls = False
        ' Me.SetTopLevel(True)
    End Sub

    Private Sub ucDrawingSurface_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseClick
        Me.Hide()
        DoMouseClick()
        'Me.Show()
        'Me.Enabled = True
        bgw.RunWorkerAsync(Me)
        'bgw.ReportProgress(0, "Show")
    End Sub

    Private Sub bgw_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bgw.DoWork
        ' CType(e.Argument, ucDrawingSurface).Show()
        'CType(e.Argument, ucDrawingSurface).Focus()
        Threading.Thread.Sleep("10")
        showMe()
    End Sub

    Private Sub bgw_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles bgw.ProgressChanged
        If Not e.UserState = Nothing Then
            If e.UserState = "Show" Then
                Me.Show()
            End If
        End If
    End Sub

    Private Sub showMe()
        If Me.InvokeRequired = True Then
            Me.Invoke(New MethodInvoker(AddressOf showMe))
        Else
            Me.Show()
        End If
    End Sub
End Class