Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: use single instance IE


Message #1 by Chan Khin Sin <kschan@s...> on Mon, 12 Aug 2002 21:15:42 -0500
hi,

Create one form and add a Command Button:

Private 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

Private Sub Command1_Click()
    ShellExecute Me.hwnd, "Open", "http://www.p2p.wrox.com", vbNullString, 
vbNullString, 1
End Sub


This will open the url in the IE windows which r open.

If this helps then lemme know....

regds,
ashay


> Dear All:
I have an application that will automatic launch the Internet Explorer and
pass in the Url to IE from my VB application. The problem here is everytime
i run my application, there will be a new instance of IE being launch
because i use CreateProcess API function. I wonder is there a way or anya
another API function that I can use so that the application will usew the
existing IE instead creating a new one when I run my application and pass 
in
different URL address? Thanks

  Return to Index