richtext:Adding Hyperlink Capability to RichText Boxes-vb教程来源: 发布时间:星期四, 2009年2月12日 浏览:156次 评论:0
Adding Hyperlink Capability to RichText Boxes This tip show how to add hyperlinks o a RichTextBox. What you need to create is two es that will eract with the RichTextBox. The two es are CHyperlink and CHyperlinks. CHyperlink CHyperLink is a simple Class that describes a hyperLink and has a method to open the URL it pos to. Properties:
The LinkText property is a containing the text shown in the RTF box (Click here to go to Microsoft). The OpenLink methods use the ShellExecute API function to launch the default webbrowser and passes the URL to it. CHyperLinks CHyperLinks is a collection . It contains a collection of CHyperLink objects. When you develop an application you _disibledevent=>The Add method will add a CHyperLink object to the collection AND add the text \"Go to VB-World\" to the RichTextBox1 object. This text will be underlined and in the colour blue. When you click _disibledevent=> Completed Hyperlink Demo Project I have that show you how to use the es. It is written in VB5. The zip file also s two text files that contain the code of two es that you can just cut and paste you´re not able to open the project. Tip by 0
相关文章读者评论发表评论 |