|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 CppWebBrowser1->ExecWB(Shdocvw_tlb::OLECMDID_PRINT,Shdocvw_tlb::OLECMDEXECOPT_DONTPROMPTUSER); 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
|
||||
|
||||
|
The DocumentComplete event never worked correctly for me. I use the ProgressChange event instead:
Code:
procedure TfrmMain.WebBrowserProgressChange(Sender: TObject; Progress, ProgressMax: Integer); begin if Progress = -1 then bReadPage := true; end; Elsewhere in the code, I have: Code:
bReadPage := false;
WebBrowser.Navigate('http://www.foo.com/');
while not bReadPage do
Application.ProcessMessages;
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 Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Delphi Programming > Borland C++ Builder using Delphi Forms question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|