473,953 Members | 1,845 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

array and shell

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

Call Shell("C:\Progr am Files\Internet Explorer\IEXPLO RE.EXE
http://www.microsoft.c om", AppWinStyle.Min imizedNoFocus, True)

Call Shell("C:\Progr am Files\Internet Explorer\IEXPLO RE.EXE
http://www.yahoo.com",
AppWinStyle.Min imizedNoFocus, True)

Call Shell("C:\Progr am Files\Internet Explorer\IEXPLO RE.EXE
http://www.google.com" ,
AppWinStyle.Min imizedNoFocus, 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 2549
James,

I don't know if it helps your problem, but you more nice you can use the
application.Sta rt 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******@inovi on.comschreef in bericht
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
I'm using (successfully in VB Express) this routine:
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click

Call Shell("C:\Progr am Files\Internet Explorer\IEXPLO RE.EXE
http://www.microsoft.c om", AppWinStyle.Min imizedNoFocus, True)

Call Shell("C:\Progr am Files\Internet Explorer\IEXPLO RE.EXE
http://www.yahoo.com",
AppWinStyle.Min imizedNoFocus, True)

Call Shell("C:\Progr am Files\Internet Explorer\IEXPLO RE.EXE
http://www.google.com" ,
AppWinStyle.Min imizedNoFocus, 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(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click

Call Shell("C:\Progr am Files\Internet Explorer\IEXPLO RE.EXE
http://www.microsoft.c om", AppWinStyle.Min imizedNoFocus, True)

Call Shell("C:\Progr am Files\Internet Explorer\IEXPLO RE.EXE
http://www.yahoo.com",
AppWinStyle.Min imizedNoFocus, True)

Call Shell("C:\Progr am Files\Internet Explorer\IEXPLO RE.EXE
http://www.google.com" ,
AppWinStyle.Min imizedNoFocus, 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 InternetExplore r the COM object,
exposed by the Microsoft Internet Controls COM library (shdocvw.dll).

Something in the ways of:

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

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

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

If IE Is Nothing Then IE = New SHDocVw.Interne tExplorer
IE.Visible = True
IE.Navigate2(UR L)
End Sub

Private Sub IE_DocumentComp lete(...) _
Handles IE.DocumentComp lete
'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
12358
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 straight byte data (that is, I'm concerned with individual bits packed into the bytes), I'd like to put that data into a byte array that's passed from the C# app to the DLL function. In the past, I've been able to marshal strings to character strings...
3
1559
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 Array?? Does it loop through the array and cast them all and I end up with a big array (This is what I hope will happen)? Or does it simple cast the pointer address and I end up with a small array?? Related question: How do I make sure everything...
10
2118
by: dfetrow410 | last post by:
Is there an example of how to store and access an array in a Property Dave
0
2847
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 getting an exception. What's the correct way to handle this type of data? I receive an invalid cast exception. Here's my non working code Array droppedItemList = (Array) e.Data.GetData("Shell IDList Array");
13
1980
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 http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7 Looks like the "version" function isn't supported, at least not in the Firefox console. So many of the new features - especially using the "let" and "yield" keywords, as well as practical Array comprehensions which depend on...
2
4347
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: System::UInt32 m_indeces __gc; public: CopyTest(unsigned int indeces __nogc, unsigned int arrayLength)
5
1897
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: Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: an integer is required
14
12515
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 non-zero. ***** Here is an example of what I need to do: #define YEAR_1 2005 #define YEAR_2 2007 #define YEARS (YEAR_2 - YEAR_1 + 1)
2
3266
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 Photoshop or word it will open correctly. The research I've done points to "Shell IDList Array" but most of it is determining how to accept and parse the CIDA, I'm looking for how to build it and load the DataObject appropriatly. Any help would be...
0
10004
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11619
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9922
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8295
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7457
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6245
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6370
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4976
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.