Stopping TWebBrowser Errors On GoBack And GoForward

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


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!

FLASH! BANG! The action just never ends. You want your site to look great? You want it to stand out from the crowd? You want it to be free of smelly foot odor? Then you MUST MUST MUST have... Go here: FlashBanger's!


Copyright 2001 - 2012 by and OECCorp.
The 2012 Evolution™ is an OEC InterNET Group site.SupportNotices