[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

Opening a URL in a Frame

How would I open a URL, say "www.msn.com" in the "left" frame of a frameset or just open a new window if a frameset didn't exist?

Thanks
0
mh149
Asked:
mh149
  • 2
1 Solution
 
mcriderCommented:
Add the Microsoft Internet Controls to your project.  Then you can do:

    WebBrowser1.Navigate "www.msn.com"


To add this control, right-click the toolbox and select "Components..." then select it from the list...


Cheers!
0
 
mh149Author Commented:
That works to open a new URL in a new window.  However, it does not direct that URL into a frame.
0
 
mcriderCommented:
mh149,

Sorry, but the solution I gave does not open a URL in a new window. It opens the URL in a webbrowser control.  If you want to put the webbrowser control in a frame, use something like:

   Set WebBrowser1.Container = Frame1


Cheers!
0
 
prefixCommented:
I think here's a better way.
type:
shell "start.exe http://www.msn.com",vbhide

or
paste the text into a Model:

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

and place any things you want to fire the event,try to type the text on the event:
ShellExecute 0&, vbNullString, "http://www.msn.com", vbNullString, vbNullString, vbNormalFocus


0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now