Mettete il cosice tra i Tags CODE e /CODE...........

Potresti:
codice:
Class Procedura

Friend Sub Procedura
Using fmMsg as new frmMsg
fmMSG.textboxMessaggio.text = "Attendere prego, procedura in corso"
fmMSG.Show

'Procedura
  For n As Integer = 0 To 100
            'Application.DoEvents()
            System.Threading.Thread.Sleep(10)
  Next

fmMSG.close
End Using
End Sub
Opure facendola sporca:

codice:
 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim task As New System.Threading.Thread(AddressOf showForm)
        task.Start()
        For n As Integer = 0 To 1000
            System.Threading.Thread.Sleep(10)
        Next
        f = Nothing
        task.Abort()
    End Sub

    Sub showForm()
        Try
            f = New Form2
            f.ShowDialog()
        Catch ex As Exception
        End Try
    End Sub