• We just launched and are currently in beta. Join us as we build and grow the community.

Create a Hyperlink in VB 6.0

MASAYA2018

Binary Builder
M Rep
0
0
0
Rep
0
M Vouches
0
0
0
Vouches
0
Posts
165
Likes
174
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 200 XP
In this tutorial, we will create a hyperlink label in VB 6.0. I also created this tutorial in VB.NET using the LinkLabel Control but here in VB 6.0 there is no shortcut control for this.

Now, let's start this tutorial!

1.Let's start this tutorial by following the following steps in Microsoft Visual Basic 6.0: Open Microsoft Visual Basic 6.0, click Choose Standard EXE, and click Open.

2. Next, add only one Label named Label1 and labeled it as "Click this to go to Sourcecodester Website". You must design your interface like this:

linkdesign_1.png


3. Go to Project Menu and click References.
linkreferences.png


4. Find and Check Microsoft Internet Controls and click OK.

linkmicrosoft.png


5. Now, put this code in your code tab.

  1. Private

    Sub

    Form_Load()
  2. Label1.FontBold = True
  3. Label1.FontUnderline = True
  4. Label1.ForeColor = vbBlue

  5. End

    Sub

  6. Private

    Sub

    Label1_Click()
  7. Dim

    Ie As

    New

    InternetExplorer
  8. Ie.Visible = True
  9. Ie.Navigate "http://www.sourcecodester.com/"
  10. End

    Sub

Explanation:

In our Load Event of our form, we make our Label1 to have a Bold Text, Underlined, and have a color blue to make a hyperlink image. Now, in clicking the Label, we initialized or instantiate variable ie as an InternetExplorer. InternetExplorer is a part of the Microsoft Internet Controls Reference. We make this visible, and when clicking the Label it will navigate to www.sourcecodester.com.

Output:

linkoutput1.png

linkoutput2.png


Download the source code and try it! :)

For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below and hire me.

Best Regards,

Engr. Lyndon R. Bermoy
IT Instructor/System Developer/Android Developer
STI College - Surigao City
Mobile: 09488225971
E-mail:[email protected]

Follow and add me in my Facebook Account: https://www.facebook.com/donzzsky

Visit and like my page on Facebook at: https://www.facebook.com/BermzISware


Download
You must upgrade your account or reply in the thread to view the hidden content.
 

452,292

324,736

324,744

Top