473,408 Members | 1,968 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

How to open web browser and mail client

What code do i need to use if i want to call my default
web browser from vb.net and mail client?
Nov 20 '05 #1
4 4643
-----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
Nov 20 '05 #2
* "Ryan Joseph So" <ac***********@hotmail.com> scripsit:
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:ba*@askjda.sad".

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Cor
A new one

:-))

Cor

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

Nov 20 '05 #4
Cor
A new one????????
I forgot

:-))

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

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Dave Holmes | last post by:
Is there a way to keep an other application from opening a link in a browser where I am running an ASP application? For example, I have an ASP application open in a browser. If I click on a link...
8
by: Hans | last post by:
Hi! I don't think this is possible but I have a report that is created in XML and transformed to html using XSL. Is it possible to add a link in this report that will mail itself (the report as...
13
by: Jan Krumsiek | last post by:
Hi. I searched the Usenet and the Web for this simple information but did not really find anything. How can I open URL in the standard browser of the system? (VB6, VC++ you could easily use...
1
by: vijaygparikh | last post by:
HI i am writting a code for open default mail client and it works fine. i want to attach a file with the default mail client but file is not attached with "mailto:" option. If any one has idea...
6
by: Shimon Sim | last post by:
Hi 1) Is it possible to force browser to open image in default windows application? That is what specifies in Folder Options for jpg extension. 2) Also if the 1) is possible is it possible to...
6
by: qysbc | last post by:
I have a web page and there is a link to open a TIFF file. The way I do it is to have the server code open a binary stream, set the content type to "image/tiff" and call Response.BinaryWrite. On...
158
by: Giovanni Bajo | last post by:
Hello, I just read this mail by Brett Cannon: http://mail.python.org/pipermail/python-dev/2006-October/069139.html where the "PSF infrastracture committee", after weeks of evaluation, recommends...
6
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am thinking about doing this since I got several cases that some of our internal users open more than one browser at the same time from our server. When one of the transactions was not...
23
by: andyoye | last post by:
How can I launch Outlook on users machines when they click a button on a web form (InfoPath)? Thanks
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.