How to open web browser and mail client

  • Thread starter Thread starter Ryan Joseph So
  • Start date Start date
R

Ryan Joseph So

What code do i need to use if i want to call my default
web browser from vb.net and mail client?
 
-----Original Message-----
What code do i need to use if i want to call my default
web browser from vb.net and mail client?
.

in visual basic you can write this code

'//SHELLEXECUTE:The ShellExecute
'function opens or prints a specified file.
'The file can be an executable file or a
'document file.


'//SW_SHOWNORMAL = 1:Activates and displays a
'window. If the window is minimized or
'maximized, Windows restores it to its
'original size and position. An application
'should specify this flag when displaying the
'window for the first time.


Public Sub Label1_Click()
'//ShellExecute(
'hwnd>> handle to parent window
'lpOperation>> pointer to string that specifies operation
to perform
'lpFile>> pointer to filename or folder name string
'lpParameters>> pointer to string that specifies
executable-file parameters
'lpDirectory>> pointer to string that specifies default
directory
' nShowCmd>>whether file is shown when opened
')

ShellExecute hwnd, vbNullString, "www.microsoft.com" _
, vbNullString, vbNullString, SW_SHOWNORMAL

End Sub
 
* "Ryan Joseph So said:
What code do i need to use if i want to call my default
web browser from vb.net and mail client?

\\\
Imports System.Diagnostics
..
..
..
Dim psi As New ProcessStartInfo()
psi.UseShellExecute = True
psi.FileName = "http://www.mvps.org"
Process.Start(psi)
///

In order to send a mail, use something like "mailto:[email protected]".
 
\\
Imports System.Diagnostics
..
..
..
Dim psi As New ProcessStartInfo()
psi.UseShellExecute = True
psi.FileName = "http://www.mvps.org"
Process.Start(psi)
///
This one, one of the items I never answer but see often.

It is a favorite question to answer by a lot of persons in this group and
this was in an alternate style..

Cor
 
* "Cor said:
Imports System.Diagnostics
.
.
.
Dim psi As New ProcessStartInfo()
psi.UseShellExecute = True
psi.FileName = "http://www.mvps.org"
Process.Start(psi)
///
This one, one of the items I never answer but see often.

It is a favorite question to answer by a lot of persons in this group and
this was in an alternate style..

Ah, now I understand what you wanted to tell me...
 
Back
Top