Click to See Complete Forum and Search --> : ShellExecute to load new instance of IEXPLORE.EXE


dimspyder
September 18th, 2001, 11:32 PM
among other things i am trying, this one is fairly simple i just cant get it to execute properly. I want a new instance of internet explorer to load and display a page which i have specified. i can get this to work at the cmd line with this "start iexplore.exe http://chat.msn.com/find.msnw?cat=CP" but when i try to do that within VB it doesnt seem to work. i have also thrown a variable into the mix by letting the user have input into which category it displays (msn sorts the chat room categories by 2 letters... such at CP for computing or TN for teen). the code that i have so far is as follows:


private Sub cmdViewPage_Click()
ShellExecute hWnd, "open", "http://chat.msn.com/find.msnw?cat=" & txtCategory.Text, vbNullString, vbNullString, conSwNormal
End Sub



the only problem with this is that it doesnt open a new instance of IE.. it uses one thats already open, and to open a new instance i need this cmd to execute: "start iexplore.exe http://chat.msn.com/find.msnw?cat=CP"
i cant seem to get it to work within VB, so if anyone has any suggestions i would really appriciate it. thx,

-frank

Eddie Leong
September 19th, 2001, 05:39 AM
Try visit to www.vbcode.com and search for 'shell' a lot of sample code for execute an IE.

Eddie

midnightservice
September 19th, 2001, 07:16 AM
try this

shell "c:\program files\inernet explorer\iexplorer.exe http://www.yourdomain.com"


works for me

midnightservice

Zac Howland
September 19th, 2001, 08:22 AM
It has been a while since I programmed in VB, so this may not work. In the command line, if you type "start mypage.htm" the system will open a new instance of IE displaying the page you gave it. I think if you change "open" to "start" in you ShellExecute command that will handle it. Let me know if it works.

Zac Howland

dimspyder
September 19th, 2001, 12:00 PM
alright i finally got this to work, thanks everyone :)