* "Cor" <no*@non.com> scripsit:
Why not use 'System.Diagnos tics.Process.St art'?
Do you know who did give this method to John yesterday?
It has a style that looks to me to............. .......
\\\
Shell("C:\bla.e xe")
///
:-)
Sorry, I don't understand.
BTW: I have adapted the code Fergus and you developed for sending mails
by opening the default mail client. I played around and I found out
that subject and message will have to be encoded too (otherwise there
may be wrong results if the message or the subject contain certain
characters like "@" and/or "&". Here's the final version:
\\\
Imports System.Diagnost ics
Imports System.Web
Public Sub StartDefaultMai l( _
ByVal [To] As String, _
Optional ByVal Subject As String = "", _
Optional ByVal Message As String = "" _
)
Try
Dim psi As New ProcessStartInf o
psi.UseShellExe cute = True
psi.FileName = _
"mailto:" & HttpUtility.Url Encode([To]) & _
"?subject=" & HttpUtility.Url Encode(Subject) & _
"&body=" & HttpUtility.Url Encode(Message)
Process.Start(p si)
Catch ex As Exception
Throw New Exception("Defa ult mail client could not be started.", ex)
End Try
End Sub
///
--
Herfried K. Wagner [MVP]
<http://dotnet.mvps.org/>