Create a Hyperlink in VB 6.0
Submitted by donbermoy on Monday, March 17, 2014 - 19:27.
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:
3. Go to Project Menu and click References.
4. Find and Check Microsoft Internet Controls and click OK.
5. Now, put this code in your code tab.
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
![link](https://www.sourcecodester.com/sites/default/files/linkdesign_1.png)
![Add reference](https://www.sourcecodester.com/sites/default/files/linkreferences.png)
![links](https://www.sourcecodester.com/sites/default/files/linkmicrosoft.png)
- Private Sub Form_Load()
- Label1.FontBold = True
- Label1.FontUnderline = True
- Label1.ForeColor = vbBlue
- End Sub
- Private Sub Label1_Click()
- Dim Ie As New InternetExplorer
- Ie.Visible = True
- Ie.Navigate "http://www.sourcecodester.com/"
- 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:
![output](https://www.sourcecodester.com/sites/default/files/linkoutput1.png)
![output](https://www.sourcecodester.com/sites/default/files/linkoutput2.png)
Add new comment
- 2866 views