[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

onclick of a label to open like mailto in web

Posted on 2004-04-15
10
Medium Priority
?
291 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
10 Comments
 
LVL 53

Accepted Solution

by:
Ryan Chong earned 1200 total points
ID: 10831621
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 53

Expert Comment

by:Ryan Chong
ID: 10831628
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
ID: 10834764
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 53

Expert Comment

by:Ryan Chong
ID: 10835515
>>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
ID: 10847964
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
ID: 10847977
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
ID: 10848399
The http works for me, so don't know what is happening, maybe remove the http, then it also works
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

649 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