Solved

open new bowser window  from vb

Posted on 2001-09-12
11
244 Views
Last Modified: 2010-08-05
I opened a browser window using the foll. statement.

Shell "start.exe http://..w.html", vbHide

It works good.
    What's my problem is the above command opens a new browser window say IE when no other IE opened. But If I already opened IE for some other purpose, When I execute the above command It doesnt open new IE. instead of that it opens in the existing IE.
   I'd like to open a new IE even another IE opened.
   Please Guide me.
0
Comment
Question by:MuruganEE
  • 3
  • 2
  • 2
  • +4
11 Comments
 

Author Comment

by:MuruganEE
ID: 6478613
thanks
0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6478626
Hi!

Do something like:

Shell "C:\IEFolder\IE.exe http://..w.html"

Wheere C:\IEFolder\IE.exe is the file path cum name of the IE exe file.

That's it!

glass cookie : )

0
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 6478692
Hi MuruganEE,

Try this: ?


'! Open File with File Association
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Declare Function GetDesktopWindow Lib "user32" () As Long
'! Open File with File Association

Public Function StartDoc(ByVal FileName As String) As Long
    Dim Scr_hDC As Long
    Scr_hDC = GetDesktopWindow()
    'change "Open" to "Explore" to bring up file explorer
    StartDoc = ShellExecute(Scr_hDC, "Open", FileName, "", "C:\", 1)
End Function


'Hope will help.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 22

Expert Comment

by:ture
ID: 6478854
But... "Bowser"... isn't that a character in the Super Mario games? What does he have to do with this VB code?

:o)

/Ture
0
 

Author Comment

by:MuruganEE
ID: 6478964
Hi ryancys ,
   Your method works like same as  
Shell "start.exe http://..w.html", vbHide
   Your md opens in the existing IE window, not in new window.
    thanks . keep mailing.
************************************
Hi glass_cookie,
    If I use this one I need to pick IExplore.exe path.
That is to be matched for every system.
I cant give "c:\file.." explicitely.
    thanks . keep mailing.
0
 
LVL 1

Expert Comment

by:gegege
ID: 6479113
if you read the registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IE Setup\Setup\Path

then it will give you the path to IE so you don't have to hard code "C:\program files\Internet Explorer"

The exe is always called iexplore.exe so just add that to the path.  Then use  glass_cookie's suggestion.



ed
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6479245
"Starting Specified URLs in Separate Instances of the Default Browser"
http://www.mvps.org/vbnet/index.html?code/fileapi/browserstart.htm
0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6481296
Hi!

Use this code:

Download...
http://www.vb-helper.com/HowTo/getassoc.zip
Description: Find the program associated with a file extension (3K)

That's it!

glass cookie : )
0
 
LVL 8

Accepted Solution

by:
glass_cookie earned 50 total points
ID: 6481302
Hi1

Here's another one:

Download...
http://www.planetsourcecode.com/vb/scripts/ShowZip.asp?lngWId=1&lngCodeId=8661&strZipAccessCode=soUt86610172

Description: This code enables you to list all file extensions in your machine which have registered file associations. The list will show what application title each file extension belongs to, what program execution command it is associated with, as well as the icons used. With this program, you can view, add and remove file associations, with ease and elegance. The application also provides a system tray function.


Snapshot:
http://www.planetsourcecode.com/xq/ASP/txtCodeId.8661/lngWId.1/qx/vb/scripts/ShowCode.htm

Just in case the above code doesn't return the path, only the name (unable to test it).

That's it!

glass cookie : )
0
 
LVL 3

Expert Comment

by:modder
ID: 6536282
MuruganEE

Please finalise this question, even if nobody gave you a satisfactory answer - in that case just let me know and I will be happy to refund your points to you.

If someone did give you a satisfactory answer, please accept the comment as the answer. If you are having problems doing that let me know.

Please do *not* ignore this request. To the other participants in the thread - if no response is forthcoming alert me and I will take action.

Regards

modder
Community Support Admin
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6536511
"Starting Specified URLs in Separate Instances of the Default Browser"
http://www.mvps.org/vbnet/index.html?code/fileapi/browserstart.htm 


I believe answered the user's question exactly
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Paint/Redraw window while dragging 16 78
Access query that references subform 5 47
Modifying Conditional Format from VBA code 3 56
VB 6 error 5 in windows 10 but not in XP 7 56
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question