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 - 2008 by CodeFoot.com and OECCorp.

LegalPrivacyCodeFoot.com is an OEC InterNET Group site.SupportNotices
CodeBrain.com BrainCode.com CodeFoot.com CodeBelly.com CodeLifter.com
PopUpWorks.com D3Q.com etLux.com FFFast.com OECCorp.com
IEFix.com MicroTicker.com