1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Rep Power

    Borland C++ Builder using Delphi Forms question

    Hi All ,
    I am damn new to C++ and delphi and am asked to do this little project.
    I need help.
    I am using a web browser(CppWebBrowswer1) and call the navigate method , CppWebBrowser1->navigate(url).This url is an exception page(html page) on a mobile vehicle and is accessed as the vehicle comes in range of the access point.
    This HTML page is generated bu software running ont he vehicle.

    MY PROBLEM -- I print the page directly

    onDocumentComplete(..or OnNavigateComplete2). The problem is I need to check if there is a HTML page because, at times , i get this HTTP 404(page not found print out).That is the application tries to print a page faster than it is generated by the software on the mobile vehicle.

    I need to be able to some how check to see if the page exists( if the server on the mobile vehicle returns HTTP 404), and if not, not to print.
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Woodland Hills, Los Angeles County, California, USA
    Rep Power
    The DocumentComplete event never worked correctly for me. I use the ProgressChange event instead:
    procedure TfrmMain.WebBrowserProgressChange(Sender: TObject; Progress,
    	ProgressMax: Integer);
    	if Progress = -1 then
    		bReadPage := true;
    Elsewhere in the code, I have:
    bReadPage := false;
    while not bReadPage do
    This has always worked for me.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo