CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 1999
    Location
    Poland
    Posts
    278

    Does RichTexBox.DetectUrls work for link to disk file?

    Hello


    In Framework 2.0
    Code:
    this.rtb = new RichTextBox();
    rtb.DetectUrl = true;
    rtb.AppendText("c:/text.txt");
    as a result I can see "c:/text.txt" formates as a link to file test.txt

    In Framework 1.1
    as a result I can see "c:/test.txt" which is not formated as a link.

    My question is:
    1. Does DetectUrls work only for HTTP links ?
    2. Is it possible to format "c:/.." string as a link to file without addidtional extra code ?

    Thanks in advance
    andrzej
    Last edited by Andrzej; August 31st, 2008 at 11:57 PM.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Does RichTexBox.DetectUrls work for link to disk file?

    Yes, it will accept any of these protocols :

    Code:
    file:, mailto:, ftp:, http:, https:, telnet:, news:, wais:, outlook:, gopher:, nntp:, prospero:
    To link to a file on disk, you have to supply file:, like this :
    Code:
    file:///C:/WhateverFolder/WhateverFile
    I hope it helps.

  3. #3
    Join Date
    Jul 1999
    Location
    Poland
    Posts
    278

    Re: Does RichTexBox.DetectUrls work for lik to disk file?

    Thank you very much for your concrete, perfect answer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured