What code will run my function in multiple threads?

Hello.  I have written a function here in VB.NET that basically remotely connects to a computer and checks on the percent bitlocker complete status on the machine which takes a long time encrypting a boot drive of course.  i'm having to encrypt many machines and wrote this to let me know the status of each one.  Can anyone add the code here that will basically let me pass a list of computer names to my function and have it run in separate threads?  one per name...the list of computer names can be in an array or i  may just put them in a listbox or something...not sure on that yet

Here is the function and i currently call it as: show_progress("211mt03", 15, 15)  ....("computername", x,y)  x and y are the positions of the progress bar which i haven't figured that out yet actually.
Thanks!

Private Function show_progress(ByVal cname As String, ByVal x As Integer, ByVal y As Integer)
        Dim p1 As New ProgressBar
        Dim myConnectionOptions As New System.Management.ConnectionOptions
        With myConnectionOptions
            .Authentication = System.Management.AuthenticationLevel.Connect
            .Authentication = System.Management.AuthenticationLevel.PacketPrivacy
        End With
        Dim strComputer = cname
        Dim colItems As ManagementScope
        colItems = New ManagementScope("\\" & strComputer & "\root\CIMV2\Security\MicrosoftVolumeEncryption", myConnectionOptions)
        colItems.Connect()
        If colItems.IsConnected = False Then
            MsgBox("Could not connect to WMI namespace")
        End If
        Dim query As ObjectQuery
        query = New ObjectQuery( _
            "SELECT * FROM Win32_EncryptableVolume")
        Dim searcher As ManagementObjectSearcher
        searcher = _
            New ManagementObjectSearcher(colItems, query)
        Dim queryCollection As ManagementObjectCollection
        queryCollection = searcher.Get()
        Dim m As ManagementObject
        For Each m In queryCollection
            Dim ConversionStatus As ManagementBaseObject = m.InvokeMethod("GetConversionStatus", Nothing, Nothing)
            Label1.Text = ConversionStatus("EncryptionPercentage").ToString & "%"
            '  ProgressBar1.Value = ConversionStatus("EncryptionPercentage")
            p1.Size = New Size(242, 24)
            p1.Location = New Point(x, y)
            p1.Value = ConversionStatus("EncryptionPercentage")
            p1.Visible = True
            p1.Show()
            Controls.Add(p1)
        Next
    End Function

Open in new window

linuxroxAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Eric GreeneDirector of TechnologyCommented:
It's really not as simple as throwing-down a few lines of code to wrap your commands in various threads.  There's a lot to managing threads.  Here's a link that will point you in the right direction:

Multithreading in Visual Basic

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.