Display HTML from PB

  .

Demo Source Code

(What it does, and code section "how" or "why" remarks stay in source code comments for now. Going to be busy using it myself.)

Any language that can access Windows API functions.
' I use HTML instead of RichEdit, and don't embed a
'browser. Instead I use ShellExecute. It opens default browser for HTML, or a
'tab; with bonus of CSS and javascript. :-)
'[code]
#compile exe
#dim all
'declare copied from include to see pieces here
declare function ShellExecuteW lib "Shell32.dll" alias "ShellExecuteW" _
                                              (byval hwnd as dword, _
                                               byref Operation as wstringz, _
                                               byref File as wstringz, _
                                               byref Parameters as wstringz, _
                                               byref Directory as wstringz, _
                                               byval nShowCmd as long) as dword
'The "lp" in lpFile doesn't make sense for BYREF.
'Explicitly put BYREF for clarity.
'
function pbmain () as long
  local PID as dword
  local FilePath as wstringz * %max_path
  FilePath = "c:\yarker-dsyc\index.html"$$ '<===sample on my PC, change to suit
  ShellExecuteW (0, "open"$$, FilePath, ""$$, ""$$, %sw_shownormal)
end function '[/code]Keep it simple and you (as in all) can choose.

Cheers,


Created on 12 May 2025

To Domain Home.

home
To Dale's Notebook index.
notebook
To Programs index.
programs