Solved

onclick of a label to open like mailto in web

Posted on 2004-04-15
10
278 Views
Last Modified: 2010-05-02
Hi,
  Please help me to simulate "mailto" in web action, to onclick of a label in VB. And onclick of a web address label in Vb to open webaddress in IE.

Thanks and Regards,
Nabeel.
 
0
Comment
Question by:nabeelkp
  • 3
  • 2
  • 2
10 Comments
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 300 total points
Comment Utility
http://vbnet.mvps.org/code/intrinsic/sehyperlink.htm
then just change this:

Text1.Text = "http://vbnet.mvps.org/"

to

Text1.Text = "mailto:user@domain.com"
0
 
LVL 49

Expert Comment

by:Ryan Chong
Comment Utility
Here is another example:

Put a Hyperlink on a Form
http://www.freevbcode.com/ShowCode.Asp?ID=3016

cheers
0
 
LVL 9

Expert Comment

by:p_sie
Comment Utility
Use the shellexecute API
I don't know the exact phrase right now, cause I am not behind my VB-computer... sorry for that, but
try something like below

in module

Public Function ShellExecute .... (You can find this using the API-viewer)

Sub label1_click()

Shellexecute ... "open", label1.caption , ....

End sub
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 49

Expert Comment

by:Ryan Chong
Comment Utility
>>You can find this using the API-viewer
Try download it or view it online at www.allapi.net

cheers
0
 

Author Comment

by:nabeelkp
Comment Utility
Hi,
  I am using VB6 and tried

ShellExecute Me.hWnd, "open", "http://www.yahoo.com", vbNullString, "", 0

But it doesn't work out for me. Please help me to solve this.

Nabeel.
0
 

Author Comment

by:nabeelkp
Comment Utility
Hi,
  ShellExecute Me.hWnd, "open", "mailto:myemail@myweb.com", vbNullString, "", 0
It works for "mailto" action, but it doesn't work for "http", what could be the reason.

0
 
LVL 9

Expert Comment

by:p_sie
Comment Utility
The http works for me, so don't know what is happening, maybe remove the http, then it also works
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now