|
-
Jan 21st, 2010, 04:17 AM
#1
Thread Starter
New Member
How to open multiple IE? (Visual Studio 2008) (multithreading)
what i did was i use a select statement in opening multiple IE just for testing but the main function is what you put number on a textbox then the number the IE's will open for example i put 100 on textbox then when i click a button then 100 IE's will open so if im going to use select statement when opening 100 IE my code will be crazy... heres my sample code..
Code:
Private Sub btnGenerate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGenerate.Click
Dim num As Double
Try
num = txtNoOfMulti.Text
Catch ex As Exception
MsgBox("You Must Enter a Number", MsgBoxStyle.Exclamation)
End Try
Select Case num
Case "1"
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
Case "2"
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
Case "3"
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
Case "4"
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
Case "5"
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
End Select
End Sub
-
Jan 21st, 2010, 04:22 AM
#2
Re: How to open multiple IE? (Visual Studio 2008) (multithreading)
How do you usually do the same thing multiple times? With a loop. What type of loop is best for doing something a specific number of times? A For loop.
-
Jan 21st, 2010, 04:57 AM
#3
Thread Starter
New Member
Re: How to open multiple IE? (Visual Studio 2008) (multithreading)
i try the loop for this and for loop but the IE never stops poping... i think its a if else statement but i dont why... i think its something like this but i dont know the exact code
Code:
dim x as integer
x = System.Diagnostics.Process.Start("iexplore", "www.mail.yahoo.com")
-
Jan 21st, 2010, 06:05 AM
#4
Re: How to open multiple IE? (Visual Studio 2008) (multithreading)
Process.Start doesn't return an Integer. There's no use for an If...Else statement because that specifically tests a condition and does one thing if it's True and another if it's False, which is not what you want to do. A For loop is specifically for performing an action a specific number of times, which is what you want to do. Maybe you should show us your attempt at a For loop and we can help you fix it.
-
Jan 21st, 2010, 08:03 PM
#5
Thread Starter
New Member
Re: How to open multiple IE? (Visual Studio 2008) (multithreading)
im sorry but i dont have any idea.... please give me an idea.... on how to solve this.... thx in advance...
-
Jan 21st, 2010, 08:20 PM
#6
Re: How to open multiple IE? (Visual Studio 2008) (multithreading)
A For loop is one of the basic building blocks of VB.NET programming. If you have no idea how to use them then I suggest that you find yourself a tutorial and work through it to get the basics down before you try more adventurous things.
http://www.homeandlearn.co.uk/NET/vbNET.html
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|