Printing Contents of Web Browser Control from PB 6.0

I am using the MS Webbrowser control in my PB 6.0 application.  I am having a
hard time figuring out how to call the ExecWB method of the control in order to
print the contents of the control.  Has anyone had any luck printing from this
control, and if so, what is the technique that was used?

TIA!

Scott M. Peck
0
Scott
2/1/1999 7:12:48 PM
sybase.ole-ocx-activex 6324 articles. 0 followers. Follow

3 Replies
510 Views

Similar Articles

[PageSpeed] 26

From one of my samples......
Hope this helps,
Reed Shilts
PowerBuilder Kernel Group
***Nothing I Say Is Official***
-------------------------------------
// Print this web page
int OLECMDID_PRINT           = 6
int OLECMDID_PRINTPREVIEW    = 7
int OLECMDID_PAGESETUP       = 8

int OLECMDEXECOPT_DODEFAULT      = 0
int OLECMDEXECOPT_PROMPTUSER     = 1
int OLECMDEXECOPT_DONTPROMPTUSER = 2
int OLECMDEXECOPT_SHOWHELP       = 4

ole_1.object.ExecWB( OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER )  // this works
// ole_1.object.ExecWB( OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER , AsStatement! )
// this works
// ole_1.object.ExecWB( OLECMDID_PAGESETUP, OLECMDEXECOPT_DONTPROMPTUSER )
// this works

//ole_1.object.ExecWB( OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DONTPROMPTUSER ) // not
work
-------------------------------------



Scott M. Peck wrote:

> I am using the MS Webbrowser control in my PB 6.0 application.  I am having a
> hard time figuring out how to call the ExecWB method of the control in order to
> print the contents of the control.  Has anyone had any luck printing from this
> control, and if so, what is the technique that was used?
>
> TIA!
>
> Scott M. Peck



0
Reed
2/3/1999 11:37:19 PM
Reed,

Thanks for the assistance.  It was easy to enable printing following your
example.  The only problem now is when printing the contents of the WebBrowser
control using ExecWb with the prompt option, if the user clicks the cancel
button in the print dialog, I get an error that blows me out of the application.
If you have any suggestions or ideas how to avoid this, I'm all ears.

Thanks again for your help!

Scott M. Peck
0
Scott
2/9/1999 6:50:43 PM
Program the "external exception" event on the OLE object and
set the "action" value to "ExceptionIgnore!".
My typical event handler is:

-------------------------
// External Exception Handler
MessageBox( "OLE_1 External Exception Handler", description)
lb_1.AddItem( "Exception: " + description )

action = ExceptionIgnore!
-------------------------

You can ignore the "lb_1.AddItem" - my samples usually
have a listbox in which EVERY event spits stuff into.
99% of the problems of PB shutting down the application
could be solved by handling both the "ExternalException" and
the "Error" event on the OLE object/control.

Regards,
Reed Shilts
PowerBuilder Kernel Group
***Nothing I Say Is Official***


Scott M. Peck wrote:

> Reed,
>
> Thanks for the assistance.  It was easy to enable printing following your
> example.  The only problem now is when printing the contents of the WebBrowser
> control using ExecWb with the prompt option, if the user clicks the cancel
> button in the print dialog, I get an error that blows me out of the application.
> If you have any suggestions or ideas how to avoid this, I'm all ears.
>
> Thanks again for your help!
>
> Scott M. Peck



0
Reed
2/9/1999 11:41:07 PM
Reply:

Similar Artilces:

word 2000 and PB7.0 as activex via ole control -- to disable the users ablitty to print outside of the pb application
Hello everyone, I have an application that needs to control the printing of customized documents. we are using word 2000 via an activex control within PB 7.02 ole control. The process works for the most of the time. However, when we disable all the toolbars/command bars the activex control does not want to return control back to pb (sometimes). A simple action of clicking on the vertical scrollbar in the activex control does release control back to the PB script to complete its processing. These docs are protected but the reason for removing the toolbars/command bars is to rem...

VB 5.0-based ActiveX control in PB 6.0 (build 189)
Has anyone had luck using a VB 5.0-generated ActiveX control into a PB 6.0 (build 189) window? Even simple VB-based ActiveX controls (e.g., a label control) choke, even when simply being placed on a window (error hex 80004005). Same problem when the window is opened from the library painter. When the window runs, I get a PB run-time error 445 (object doesn't support this action), even though my PB app makes NO calls to the ActiveX. Any ideas? thanks, nurk. -- Tom Nurkkala, PhD tom.nurkkala@powercerv.com ...

Connection of PB 6.0 to SQL Server 7.0 & Version B/W PB 6.0 and PB 7.0
Can anyone tell me about connecting PB 6.0 to SQL Server 7.0. Please remember we are not planning to upgrade both software. When I was trying to connect PB 6.0 to SQL Server 7.0, error occurred " SQLSTAT 1003". OS=NT 4.0 Server PB=6.0 Enterprise Edition SQL SERVER=7.0 Corporate Edition I also want to know the versions between PB 6.0 to PB 7.0 If your are using the ODBC, which I assume you are, include Disablebind=1 in your DBParm. If your deployment environment is also NT, you will have to turn SQLSPY=1 using PFC services. Autocommit=FALSE and SetTransObject() ra...

Help me about connecting PB 6.0 to SQL Server 7.0 & Versions B/W PB 6.0 and PB 7.0
Can anyone tell me about connecting PB 6.0 to SQL Server 7.0. Please remember we are not planning to upgrade both software. When I was trying to connect PB 6.0 to SQL Server 7.0, error occurred " SQLSTAT 1003". OS=NT 4.0 Server PB=6.0 Enterprise Edition SQL SERVER=7.0 Corporate Edition I also want to know the versions between PB 6.0 to PB 7.0 I don't believe this is going to be possible without at least upgrading to the latest maintenance release of 6.x. On Mon, 23 Aug 1999 00:59:56 -0700, in powersoft.public.powerbuilder.database Abdul Lateef <abdul_lat...

PB 7.0 or PB 6.5 or PB 6.0 or PB5.04
We are using PB 5.04 Enterprise at this moment and are almost happy (uch) with it. Because we don't programming applications for the Internet (maybe in the near future) we haven't upgraded to version 6.0 and 6.5. Now we are confused what to do, keeping the old and 'stable' version (5.04) or upgrading to a newer version. Are there features in the newer versions wich make it a 'must' to upgrade. What are this features. Or are there reasons to stay on 5.04 (buggy newer versions?). What is doing the rest of the Powerbuilder world??? Greetings, Hans Groeneveld ...

Datawindow Web control for ActiveX
Hi, We are trying to open a new HTML document from a page which contains the Datawindow Web control for ActiveX if we use document.location=new.html then this works ok. if we use document.open(); document.write(htmlstring); document.close() Internet Explorer crashes. We'd prefer to use the latter approach, as we can generate a new html document dynamically with passed variables embedded in the document itself (hidden from users), rather than having to parse a html param string. (?emp=034567&cpt=cp01 etc) secondly, if we open a new window such as win=window.open("...

ole web browser control resize and PB 9
I have problem has developed with resizing the ole web browser control when I went to Build 7066 from Build 6066. It originally opened correctly but now it does not. Any help and/or ideas would be greatly appreciated. THIS.width = w THIS.height = h ole_web_browser.resize(w, h) ole_web_browser.object.width = unitstopixels(w, XUnitsToPixels!) ole_web_browser.object.height = unitstopixels(h, YUnitsToPixels!) This is a regression in 7066. -- <hopethishelps/> Roy Kiesler [TeamSybase] SDN CodeXchange -- http://codexchange.sybase.com <Jason Gilliss> wrote i...

VB-based ActiveX control in PB 6.0
Has anyone had success constructing a VB 5.0-based ActiveX control and embedding it in a PB 6.0 window? When inserting the control into the PB window, I get a run-time error number 80004005. I can insert the same ActiveX control in a VB applicatoin, and I can also construct JavaBeans, register them as ActiveX controls (jactivex), and insert them into PB 6.0. What's the deal with VB-based ActiveXs???? thanks, nurk. -- Tom Nurkkala, PhD tom.nurkkala@powercerv.com ...

ActiveX Control causes PB 6.0 to crash
I'm using a simple ActiveX Control to encrypt data (spDES from www.sp-soft.com). In VB 5.0 I have no problem and the control works great, but PB 6.0 seems to have problems. I place the control on a form, save the form, and then close it; no problem. However, when I try to run my app or re-open the form, PB give me the following error: The exception Integer division by zero. (0xc0000094) occured in the application at location 0x02b030b1 I havn't talked with the makers of the control yet, but we have no problem with it in VB or C++. Other controls that I'm using in PB...

HELP!: PB 6.5 and the Web Browser Control...
It is possible, in any way, to use the IE web browser control OCX in PB 6.5 ? I read in a document in the Sybase site that this control doesn't behavior well in PB 6.x, because there is some control events that are not fired (beforenavigate2, for instance). I'm not pretty sure about this... If this is true, is there another way to implement web browsing features in PB 6.5? I dont want to upgrade to PB 7.x just for this reason. Could anyone give me a hint, please? I would really appreciate it. Carlos The document is correct -- the Web Browser control definitely works ...

PB 6.0 Crashing when trying to insert an OLE Control
Has anyone ever had any experience with PB 6.0 crashing while trying to insert an OLE control onto a window/datawindow? I am simply creating a window and selecting OLE object type to place on the window. When the OLE dialog comes up ( 3 tabs: Create New, Create From File, Insert Control ), I select insert control. Whenever I do this, on multiple machines, PB crashes!! Any Ideas? Jim Leary jleary@pwrpros.com same picture here.... On Wed, 12 Aug 1998 14:45:11 -0400, "jleary@pwrpros.com" <jimleary@mindspring.com> wrote: > >Has anyone ever...

Datawindow Web control for ActiveX
Hi, We are trying to open a new HTML document from a page which contains the Datawindow Web control for ActiveX if we use document.location=new.html then this works ok. if we use document.open(); document.write(htmlstring); document.close() Internet Explorer crashes. We'd prefer to use the latter approach, as we can generate a new html document dynamically with passed variables embedded in the document itself (hidden from users), rather than having to parse a html param string. (?emp=034567&cpt=cp01 etc) secondly, if we open a new window such as win=window.open("...

PB 6.0 for PC and Web.PB
I am puzzled. We have PB 6.0 for NT, our Internet server is Netscape on Unix/Solaris. In a book it says that you should install Web.pb file pbcgi60.script in one of the directories in UNIX, but there is no file like this. Does it mean I have to have WEB.PB for UNIX, or PowerBuilder for UNIX? Please help. On Tue, 27 Jan 1998 16:03:31 -0800, Leonid Blyukher <leonid@babcockbrown.com> wrote: You need to install the Internet developers toolkit in order to get this file. It can be found in the C:\Program Files\Powersoft\PB6\IT\BIN folder. OTOH, I was not aware you could use th...

PB 6.0 DeskTop and Web.PB
Hi, I am just getting started on Internet development using PB 6.0. I am using PB 6.0 DeskTop and PowerJ 2.5, PowerDynamo and PowerSite. I do not see the Web.PB icon on the Powerbar in PB 6.0 desktop. ( I have used PB6.5 EnterPrise at work and I remember seeing Web.PB icon ) I have made sure that internet components are installed bu choosing the Custom installation. I contacted sybase support and they told me to verify the Product Matrix. No where it is specifically mentioned that a Enterprise edition is required for Web development. Could somebody tell me how I can use P...

Web resources about - Printing Contents of Web Browser Control from PB 6.0 - sybase.ole-ocx-activex

Printing - Wikipedia, the free encyclopedia
This article is about the process of reproducing text and images. For the handwriting method often called printing, see block letters . For other ...

La Presse Stops Printing Weekday Editions After 131 Years 3
This was part of the company's plan to go paperless.

Microsoft Outlook for iOS updated with 3D Touch and email printing
... a new event, and viewing your calendar. via iDownloadBlog Print The new version of Microsoft Outlook for iOS also adds support for printing. ...

"After the exodus of editors from The New Republic last year, the magazine is printing things like this..." ...
"'Ban guns. All guns. Get rid of guns in homes, and on the streets, and, as much as possible, on police.... Ban guns! Not just gun violence. ...

Epson EcoTank ET-4550 Review: The Future Of Printing Has Arrived
... cartridge. That all-too-familiar scenario is about to change. Epson’s new all-in-one Workforce EcoTank printer line is changing the printing ...

How does Jay Leno get parts for his one-of-a-kind concept car? 3D printing, of course
The former talk-show host and massive car geek relies on new manufacturing techniques to provide parts you can't just pick up on Alibaba.

EPFL's printing technique hides one image behind the other
Remember those holographic cards that give off different colors when you tilt them a certain way? Well, in the video below the fold, the &Eacute;cole ...

3-D Printing Brings Czech Cubism To Life In Gorgeous Geometric Dinnerware Set
Svetlana Koženová's collection for Czech home goods retailer Lauriger ushers Czech Cubism into the 21st century. In the years between 1910 and ...

Is ISIS printing fake Syrian passports?
Is ISIS printing fake Syrian passports?

How To Control Thermite Pyrotechnics with 3D Printing
... releasing a lot of energy all willy-nilly. Scientists at the Lawrence Livermore National Laboratory (LLNL) have figured out how to use 3D printing ...

Resources last updated: 1/7/2016 4:06:12 PM