HTMLView Library

Discussion in 'Additional Libraries' started by dzt, Sep 4, 2007.

  1. dzt

    dzt Active Member Licensed User


    This is dzHTMLView Library.

    It is very simple now to browse internet sites or display local html code or pages from your b4ppc app. It can be used even to implement a completely new User Interface which also can be changed at runtime by providing new html fles.

    Has also the ability to encode unicode to UTF8 (built-in function).

    It can also be used to URLEncode and URLDecode strings (built-in functions).
    It can be used only for PPC apps. For desktop is provided a dummy interface for design help.

    Libraries and samples attached.

    Based on the code found here
    URLEncode and URLDecode has be taken from the Mono project (.NET port to Linux)

    Image 1. Web Browser (test2)

    Image 2. User Interface (test4)

    Image 3. User Interface with Input Fields. It's values are visible to B4PPC code (test5)

    Attached Files:

    Last edited: Sep 4, 2007
  2. tvrman

    tvrman Member Licensed User



  3. agraham

    agraham Expert Licensed User

    Hi dzt

    I can't get this library and your samples to work:confused:

    All that seems to happen is that the HTML code is displayed in the hc control with a green background. The HTML doesn't seem to get parsed nor do any events fire. Any idesa?
  4. tvrman

    tvrman Member Licensed User

    did you test it on the desktop it will not work as DZT mentions.

    "For desktop is provided a dummy interface for design help"
  5. agraham

    agraham Expert Licensed User

    :sign0161: I was in too much of a hurry to try it after seing the screenshots and didn't actually read the text of his post. Thanks for pointing it out.

    However on my device only test3 runs properly.

    Test2 and test5 produce
    "An error occurred on sub hc_onbefornavigate.
    Line number:0
    Error description: FormatException"

    Test4 produces
    "An unexpected error has occurred in ppc4.exe

    File or assembly name 'System.Drawing,Version=1.0.5000.0, Culture=neutral,PublicKeyToken=B03F5F7F11D50A3A, or one of its dependencies, was not found"

    I have both CF 1.0 SP3 and 2.0 SP2 on this device and tried the tests with and without a config file. The test4 error is identical with and without a config file. This surprises me slightly as with a config file I didn't expect it load what looks like a CF 1.0 assembly! I suppose the test4 error could mean a problem with my CF 1.0 setup - although that is in the device ROM - as I use Visual Studio 2005 and CF 2.0 when playing on my device. However I haven't had a problem so far running B4PPC apps without a config file - except where needed for a 2.0 library.
  6. dzt

    dzt Active Member Licensed User

    Hi all,

    Last minute before posting the librabry and samples I changed a function name (UnicodeToUTF8 to EncodeUTF8) and didn't update the samples.


    I reattached corrected samples to the first post. Please anyone who downloaded before, should replace "UnicodeToUTF8" with "EncodeUTF8".

    Thank you for your understanding.
    Last edited: Sep 4, 2007
  7. tvrman

    tvrman Member Licensed User


    Are you having also the planning that it will be work on desktop too?

  8. Erel

    Erel Administrator Staff Member Licensed User

    dzt, as always thank you for your :sign0098:
  9. agraham

    agraham Expert Licensed User

    Excellent! All works fine now. Thanks dzt.
  10. alfcen

    alfcen Well-Known Member Licensed User

    Hello Dimitris,
    Just a quick note to say THANK YOU for this fantastic addition to B4PPC!
    You are opening new perspectives, Help managment, ebook, you name it :)
    Respectful greetings,
  11. MM2forever

    MM2forever Active Member Licensed User

    Thank you, i roamed around here after some weeks (months?) of not checking b4p sites I saw that now - Incredible Work, thx! :sign0060:
    This is exactly what i needed for my current project


    Edit:// There isn't any helpfile included, isn't it? Or is the help content included in the library itself somehow and can only be seen in the help list when having B4P v5.50?
    Last edited: Sep 30, 2007
  12. alfcen

    alfcen Well-Known Member Licensed User

    Hello Dimitris
    I tried to play a Flash file in your HTML DLL using
    <embed> and <object> tags
    with the Macromedia Flash Player for PPC in the background, and utterly failed.
    Do I assume correct that the dll does not support <embed> and <object> tags?

    Thanks & Cheers
  13. dzt

    dzt Active Member Licensed User

    Hi Robert,

    dzHTMLView is a wrapper for the native HTMLView control used by Pocket Internet Explorer.
    So, supports everything that PIE supports. Including flash.

    I hadn't tried before, so I installed Macromedia Flash player 7 and tried to open some flash sites. Some worked well some not, just as Adobe mentions.
    But in every case, I noticed the same behaviour between PIE and dzHTMLView.

    Try this site as an example
  14. alfcen

    alfcen Well-Known Member Licensed User

    Hi Dimitris
    As a wrapper it should indeed cope with flash embeds.
    I am trying to play the flash downloaded from here:

    in full screen and landscape mode. Everything works expect for the flash :)

    I will try a few modifications in the HTML source.

    I am using

    not hc.navigate(url)

    Could that make a difference? Well, hardly I believe.

    Anyway, Cheers and thanks a lot for your prompt reaction.

  15. alfcen

    alfcen Well-Known Member Licensed User

    Hi again Dimitris,

    Please ignore my last reply. I was too hasty.

    In spite of minute hope I saved the HTML code to a file (index.htm) and used
    hc.navigate(file://....). e voila, no problem with flash :)

    I prefer not to open other applications from my programs, or, at least, keep them working invisibly in the background.
    Your fantastic DLL made this possible!

    Now pondering about a help system and/or ebook application in conjunction with Filippo's Listview and Erel's regex.dll. Geez, so much tinkering ahead :)

  16. dzt

    dzt Active Member Licensed User

    Hi Robert,

    I'm glad I helped a bit...

    Actualy using hc.AddText does not load any referenced material

  17. specci48

    specci48 Well-Known Member Licensed User

    Hi dzt,

    I'm just starting to try out your HtmlView.dll and realized, that there is no .chm help for this library available (even for some other libraries you provided).

    I know I'm penetrating but (for known reasons: could you provide these additional help files?

  18. alfcen

    alfcen Well-Known Member Licensed User

    Hi Dimitris,

    Your encouragement to explore further lead to success. Thanks so much!

    Please allow me a selfish query: is it possible to disable the scrollbars irrespective of page size?

    This would allow playing Flash shows at maximum size in both portrait landscape mode.


    PS: typhoon #15 is coming about, got to lock my wings :)
  19. alfcen

    alfcen Well-Known Member Licensed User

    Hallo specci48,
    Dimitris has provided abundant sample code alongside his superb DLL.
    He has launched all his awesome dll's generously for free. With all due respect, I hardly believe we can request more work.
    Just my personal view.
  20. specci48

    specci48 Well-Known Member Licensed User

    Hi alfcen,

    I'm not angry with dzt. He is provided us some really marvellous dll's. :sign0098:

    But as I said in the other thread:
    The more and more dll's (and features we get), it is getting more and more difficult to keep the overview, if the need information is spreaded through a lot of samples, text files, ...

    Take this as a small hint for dzt. If he won't do it for his current dll's, maybe he does it for the future ones... ;)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice