473,288 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,288 software developers and data experts.

array and shell

I'm using (successfully in VB Express) this routine:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.microsoft.com", AppWinStyle.MinimizedNoFocus, True)

Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.yahoo.com",
AppWinStyle.MinimizedNoFocus, True)

Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.google.com",
AppWinStyle.MinimizedNoFocus, True)

End Sub

However, I'd like to

1) input an array of URL's and sequence through the URL's one at at time.

Right now this routine opens the first and stops until I close it, then
opens the second waiting again until I close it and then opens the third
window (instance) of IE.

I really want it

2) to load the first URL completely, then open the second URL in the same
window in place of the 1st, then 2nd URL, etc.).

Gotta be something simple... I just don't see an example anywhere

Thanks!
Jim
Nov 23 '06 #1
2 2521
James,

I don't know if it helps your problem, but you more nice you can use the
application.Start for this.

There is a sample for that on this page
http://www.vb-tips.com/dbpages.aspx?...a-14d6b93856e8

Cor
"James L Szatkowski, PE" <ja******@inovion.comschreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
I'm using (successfully in VB Express) this routine:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.microsoft.com", AppWinStyle.MinimizedNoFocus, True)

Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.yahoo.com",
AppWinStyle.MinimizedNoFocus, True)

Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.google.com",
AppWinStyle.MinimizedNoFocus, True)

End Sub

However, I'd like to

1) input an array of URL's and sequence through the URL's one at at time.

Right now this routine opens the first and stops until I close it, then
opens the second waiting again until I close it and then opens the third
window (instance) of IE.

I really want it

2) to load the first URL completely, then open the second URL in the same
window in place of the 1st, then 2nd URL, etc.).

Gotta be something simple... I just don't see an example anywhere

Thanks!
Jim


Nov 24 '06 #2

James L Szatkowski, PE wrote:
I'm using (successfully in VB Express) this routine:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.microsoft.com", AppWinStyle.MinimizedNoFocus, True)

Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.yahoo.com",
AppWinStyle.MinimizedNoFocus, True)

Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.google.com",
AppWinStyle.MinimizedNoFocus, True)

End Sub

However, I'd like to

1) input an array of URL's and sequence through the URL's one at at time.

Right now this routine opens the first and stops until I close it, then
opens the second waiting again until I close it and then opens the third
window (instance) of IE.

I really want it

2) to load the first URL completely, then open the second URL in the same
window in place of the 1st, then 2nd URL, etc.).
<snip>

I'm affraid you'll have to give up the (apparent) simplicity of your
approach and consider dealing with InternetExplorer the COM object,
exposed by the Microsoft Internet Controls COM library (shdocvw.dll).

Something in the ways of:

<aircode>
Private WithEvents IE As SHDocVw.InternetExplorer
Private mPageIndex As Integer
Private mPages() As String = { _
"www.google.com", "www.microsoft.com", "www.digg.com" _
}

Private Sub NextPage()
'Navigates to page pointed by mPages(mPageIndex) and then increments
'mPageIndex

If mPageIndex < 0 OrElse mPageIndex >= mPages.Length Then Return
Dim URL As String = mPages(mPageIndex)
mPageIndex += 1

If IE Is Nothing Then IE = New SHDocVw.InternetExplorer
IE.Visible = True
IE.Navigate2(URL)
End Sub

Private Sub IE_DocumentComplete(...) _
Handles IE.DocumentComplete
'When the pages finishes showing, move on to the next page
'(Yikes!)
NextPage()
End Sub
</aircode>

HTH.

Regards,

Branco.

Nov 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Lee Crabtree | last post by:
I have a managed DLL that I've used to expose a C++ class. One of the functions in this class reads a line out of a file into a buffer of type "unsigned char*". Since all the data is just...
3
by: Fireangel | last post by:
I want to cast a class into a byte array. I've seen some examples of this floating around, but they all have simple data members. What happens if I cast something that has a ArrayList or an...
10
by: dfetrow410 | last post by:
Is there an example of how to store and access an array in a Property Dave
0
by: Andrea | last post by:
My C# application is a drop target for the drop format Shell IDList Array I have some problems actually getting the data. I was using the same code used for the FileDrop data target but I'm...
13
by: David Golightly | last post by:
I'm getting my feet wet with JavaScript 1.7 (Firefox 2.0 only) and messing around with it in the console, working through some of the exercises given at...
2
by: Bern McCarty | last post by:
In the old MEC++ syntax I can do this: // compile in VS 2005 shell with cl -clr:oldsyntax -LD ArrayCopyOldSyntax.cpp #using <mscorlib.dll> public __gc class CopyTest { private:...
5
by: bearophileHUGS | last post by:
For array.array "B" means unsigned char, and such arrays accept to be initialized from (str) strings too, this is quite useful: But it seems such capability isn't shared with the append: ...
14
by: dan | last post by:
I would like to have the preprocessor automatically generate the number of array elements requested. Each element is zero. The elements get pasted into a larger array. The other elements may be...
2
by: Tom P. | last post by:
I am writing a file manager and I currently support simple, filename- based, drag-drop. I'd like to create the appropriate Shell IDList Array so that when a user drags a file into Paint or...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.