|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Open URL in Window
Hi,
I'm new to VB so this might seem like a simple question. Someone on my site enters a URL in a form box, all i want it to do is open that URL in a new browser window. <img src="http://img.villagephotos.com/p/2003-6/226576/form1.gif" width=432 height=81> So far i have no command functions. Code:
Private Sub Command1_Click() End Sub Private Sub Text1_Change() End Sub Can someone help me with this please? Thanks.
__________________
"They have the internet on computers now" - Homer |
|
#2
|
|||
|
|||
|
Here you go
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 Const SW_SHOW = 1 Public Sub Navigate(ByVal NavTo As String) Dim hBrowse As Long hBrowse = ShellExecute(0&, "open", NavTo, "", "", SW_SHOW) End Sub Private Sub Command1_Click() Navigate ("http://img.villagephotos.com/p/2003-6/226576/form1.gif") End Sub |
|
#3
|
|||
|
|||
|
Sorry, i make a mistake by putting <img src="http://img.villagephotos.com/p/2003-6/226576/form1.gif" width=432 height=81>
in the question. This was just an image of the form box i was using, which is at http://img.villagephotos.com/p/2003-6/226576/form1.gif. Its basically a text input box and a command button. From there i want to open the url in the window. And is it possible to do this without using dlls? Thanks. |
|
#4
|
||||
|
||||
|
Actually you should be able to just use the Shell() function.
i.e. Code:
Shell("c:/program files/internet explorer/iexplore.exe http://www.site.com/page/to/load")
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Open URL in Window |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|