|
How to autodetect Url's in Visual Basic Richtextbox control and open the URL once it is clicked: I have prepared an ActiveX dll that does all the work for you.
You just need to add a reference to TKAutodetectUrl from your project and write three lines of code in your program.
[ download file ] - TKAutoDetectURL.zip (7KB); see below an example of how to use it.
The Code:
'Declare a Member variable
Private m_o As New TKAutoDetectURL.clsAutoDetectURL
'On Form Load event set
Private Sub Form_Load()
m_o.EnableURLDetection MyRichTextBoxControl
End Sub
'And finally on Unload form event dispose the object
Private Sub Form_Unload(Cancel As Integer)
Set m_o = Nothing
End Sub
[ download file ] - TKAutoDetectURL.zip (7KB)
Thomas is an experienced Visual Basic developer, with expertise of 7+ years developing especially financial applications. His main IT skills are VB, SQL, Crystal Reports - should you need a Visual Basic developer for your projects feel free to contact Thomas through his personal website www.Kaloyani.com or through VBprofs.com - the newest Visual Basic and VB.NET resources portal.
Source: www.VBprofs.com
|