3 Replies - 5858 Views - Last Post: 07 June 2009 - 02:45 AM Rate Topic: -----

#1 azhan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 06-June 09

Opening new window in VB browser...how to?

Post icon  Posted 06 June 2009 - 11:05 PM

Hello guys!

Im a newbie here, recently im programming PHP for web based approach and i've been using ready made browser like firefox as my application. But now im switching it to custom browser with visual basic. I've created my own custom browser and it seems ok. but my question here is, how to open up a new browser (new VB browser window) as same as we open a new browser in firefox. I've been using html code that opens new window, but it open up explorer browser instead and it took very long time to open. I want it to open up as VB browser with my php codes inside.

Is there any html or php code that could open new vb browser window? instead of explorer or firefox window.

thanks

azhan

Is This A Good Question/Topic? 0
  • +

Replies To: Opening new window in VB browser...how to?

#2 paperclipmuffin  Icon User is offline

  • Disassembling...
  • member icon

Reputation: 13
  • View blog
  • Posts: 944
  • Joined: 16-April 09

Re: Opening new window in VB browser...how to?

Posted 07 June 2009 - 12:22 AM

I sugggest you first create a string variable, then set it to the current URL. Open a new instance of your program using the SHELL command and set the startup URL to your string.

I'm not allowed to give you code until you show us yours. :P

Hope that helps.
Was This Post Helpful? 0
  • +
  • -

#3 azhan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 06-June 09

Re: Opening new window in VB browser...how to?

Posted 07 June 2009 - 01:07 AM

hurm..im not familiar with the shell thingy, i found one on china server..the VB code is

Public Class Form1
	Private Sub WebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow
		Dim NewURL As String = CType(sender, WebBrowser).StatusText
		Dim frmNew As New Form1
		frmNew.WebBrowser1.Navigate(NewURL)
		'或者是frmNew.WebBrowser1.Url = New Uri(NewURL)
		frmNew.Show()
		e.Cancel = True
	End Sub
End Class



my coding on the current browser is in html like below where it navigates to new window whereby in VB application i already declare the function like code above. So, whenever I click on the html code for new VB window, I manage to open a new window in same VB application.

<a href="http://www.hyperlinkcode.com/new-window.php" target="_blank">New Browser Window</a> 


Now i found the solution already, but do you know how to resize my new VB window to smaller size? I assume we have to edit some at the first VB code that I show.
Was This Post Helpful? 0
  • +
  • -

#4 azhan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 06-June 09

Re: Opening new window in VB browser...how to?

Posted 07 June 2009 - 02:45 AM

found it...here the new code for opening new window in VB browser application without opening IE pop up..and resize it as desired....huraa..hehe


Public Class Form1
	Private Sub WebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow

		Dim NewURL As String = CType(sender, WebBrowser).StatusText
		Dim frmNew As New Form1
		frmNew.WebBrowser1.Navigate(NewURL)
		frmNew.Size = New Size(600, 780)
		frmNew.Show()
		e.Cancel = True
	End Sub



End Class



Was This Post Helpful? 0
  • +
  • -

Page 1 of 1