Software
Java
JavaScript
Delphi
HomeDelphi

Stopping TWebBrowser Errors On GoBack And GoForward

Click to select the code.  Use Control-C to copy it to your clipboard. Help

Comments

With TWebBrowser's GoBack and GoForward, an 'unspecified error' will be thrown if there is no backward or forward history to which to navigate.

This simple solution uses TWebBrowser's CommandStateChange event to grab the history flags in a case statement, enabling the back and forward buttons only when appropriate.

Remember to set the enabled state to false on the buttons, initially!

.

Copyright 2001 - 2012 by CodeFoot.com and OECCorp.
The 2012 Evolution™


LegalPrivacyCodeFoot.com is an OEC InterNET Group site.SupportNotices
CodeBrain.com BrainCode.com CodeFoot.com CodeBelly.com CodeLifter.com
PopUpWorks.com Droiddd.com etLux.com OECCorp.com
TrayApps.com DavidSosnowski.com MicroTicker.com