Register to post in forums, or Log in to your existing account
 

Web Browser Demo [[BrowserDemo]] 
This is a simple Web Browser that is actually built around the ActiveX control for Microsoft's Internet Explorer. This demonstrates how to use existing ActiveX and COM controls within zApp. ActiveX events are fully supported, displaying browser status text in this example. This allows you to leverage existing code and components that you might already own and still use zApp for creating customizeable applications.






Here is the zApp XML source code for this application:
Code:
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE zapp [
  <!ENTITY AppTitle "zApp Demo: Web Browser">
  <!ENTITY AppAuthor "Zugg Software">
  <!ENTITY AppVersion "1.0">
  <!ENTITY AppURL "http://www.zuggsoft.com/">
  <!ENTITY AppImage "ZAPP">
  <!ENTITY AboutBox SYSTEM "aboutbox.xml">
  ]>
<zapp>
  <splash color='#C4D2ED'>
    <image image='zapp' deltaleft='8' deltatop='8'/>
    <label align='Client' bevelouter='Lowered' autoleft='true' deltaleft='8' width='-8' height='-8' gradienttype='FullVertical' color='#C4D2ED' colorto='#7E98CB'><![CDATA[<b>&AppTitle;</b><br><br>
Version &AppVersion;<br><br>
by &AppAuthor;]]></label>
  </splash>
  <action name='Navigate' script='Browser.Navigate( URL.Text)' caption='&amp;Go' image='world' hint='Go' shortcut='Ctrl-G'/>
  <action name='BrowseBack' caption='&amp;Back' image='arrowleft' shortcut='Alt-Left' hint='Back' script='Browser.GoBack'/>
  <action name='BrowseForward' caption='&amp;Forward' image='arrowright' shortcut='Alt-Right' hint='Forward' script='Browser.GoForward'/>
  <action name='BrowseHome' caption='&amp;Home' image='home' shortcut='Alt-Home' hint='Home'>Browser.GoHome</action>
  <action name='BrowseStop' image='stop' hint='Stop' script='Browser.Stop'/>
  <action name='BrowseReload' image='redo' hint='Reload' script='Browser.Refresh'/>
  <toolbar name='mainmenu'>
    <menu caption='&amp;File'>
      <item action='_FileExit'/>
    </menu>
    <menu caption='&amp;Edit'>
      <item action='_EditCut'/>
      <item action='_EditCopy'/>
      <item action='_EditPaste'/>
      <itemsep/>
      <item action='_EditSpellCheck'/>
      <item action='_SpellOptions'/>
    </menu>
    <menu caption='&amp;View'>
      <item action='BrowseBack'/>
      <item action='BrowseForward'/>
      <item action='BrowseHome'/>
      <item action='Navigate'/>
      <itemsep/>
      <item caption='Normal' script='core.themeindex = -1'/>
      <item caption='Aqua' script='core.theme = "aqua"'/>
      <item action='_ThemeSelect'/>
    </menu>
    <menu caption='&amp;Help'>
      <item caption='&amp;About' script='core.execwindow( "About")'/>
    </menu>
  </toolbar>
  <toolbar name='maintoolbar'>
    <item action='BrowseBack'/>
    <item action='BrowseForward'/>
    <item action='BrowseStop'/>
    <item action='BrowseReload'/>
    <item action='BrowseHome'/>
  </toolbar>
  <window name='main' caption='&AppTitle;' width="640" height="480">
    <toolbar name='mainmenu'/>
    <toolbar name='maintoolbar'/>
    <panel align='top' height='22'>
      <button action='Navigate' align='right'/>
      <edit name='URL' caption='URL:' align='client' deltaleft='36'>&AppURL;</edit>
    </panel>
    <statusbar name='Status'/>
    <activex name='Browser' align='client' classname='Shell.Explorer'/>
    <script>
      sub Browser_StatusTextChange( sText)
        Status.Text = sText
      end sub
    </script> 
  </window>
  &AboutBox;
</zapp>
Viewer Comments [0 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net