Solved

open new bowser window  from vb

Posted on 2001-09-12
11
240 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
Comment Utility
thanks
0
 
LVL 8

Expert Comment

by:glass_cookie
Comment Utility
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 49

Expert Comment

by:Ryan Chong
Comment Utility
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
 
LVL 22

Expert Comment

by:ture
Comment Utility
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
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 1

Expert Comment

by:gegege
Comment Utility
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
Comment Utility
"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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
"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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now