Not a Member Yet,
Click here to Register

ID: 366
Viewed: 3766
Added: Aug 19, 2002
Version:
Snippet uploaded by: snippet
Written By: Unknown
Demo: Sorry, no demo



User Rated at: 0 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

How to open a URL in the default browser from your VB-app?

Highlight all by clicking in box
<!---Declaration--->
none

Highlight All
<!---Code--->
'Declare the following in a .bas module or similar: 'Goes up to the very top of the module

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As _
String, ByVal lpParameters As String, ByVallpDirectory As String, _
ByVal nShowCmd As Long) As Long
Public Const SW_SHOWNORMAL = 1


Then use the following code To make the Shell: In the form main under browser Load

Dim a As Long
a = ShellExecute(Me.hwnd, "open", "www.oden.se/~daniel/", "", "C:",SW_SHOWNORMAL);


No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Replying to a Comment...


Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2024 snippetlibrary.com All Rights Reserved. Conditions
Do NOT follow this link or you will be banned from the site!