Re: Checking if Back exists...

Posted by WAllison on October 25, 2003 at 18:59:46:

In Reply to: Checking if Back exists... posted by Joey on October 11, 2003

: I have now got the WebBrowser component through the activeX panel :-) But i have a problem! I have a button which the sends the user back and it executes this: webMain.GoBack; but! if there isnt a page there it crashes the application... how would i rune a chcek to see if a page is back before doing the functions?

ive had a look at TWebBrowser - try this - substitute TBBack/TBForward etc

procedure TMainForm.WebBrowser1CommandStateChange(Sender: TObject;
Command: Integer; Enable: WordBool);
If Command = CSC_NAVIGATEBACK then TBBack.Enabled := Enable;
If Command = CSC_NAVIGATEFORWARD then TBForward.Enabled := Enable;

Delphi Forum