Print Preview ActiveX Active Users: 57 / Visits Today: 233
Highest Active Users: 99
Print Preview ActiveX
Home | Profile | Register | Active Topics | Members | Search | FAQ | RSS
 All Forums
 Print Preview
 Sample of use in other langages than VB
 using VB.NET

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert Email Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert a File

   

T O P I C    R E V I E W
abales Posted - 04/30/2005 : 01:10:36
I am trying to get VB.NET to work with this control. It appears to do exactly what I need for the price I can spend. But the compile has hung up twice and once I have had to shutdown vstudio. The VB 6 app runs fine and I have twittled around with it already. But my app must run in VB.NET. Do you have some sample app that runs this?

I am surprised there is not one here. This leads me to think it doesn't work.....however if it does I will post one, the port of your app that is.

TIA
5   L A T E S T    R E P L I E S    (Newest First)
abales Posted - 05/04/2005 : 02:55:34
Thanks dk!

Once you said you got it working, I refused to surrender and finally found my bozo move : I did a mistake and forgot to a NEW a preview before I used it. It would run but not preview anything.

However after that I put in some code and it just fried the IDE. This was the "WaterMark". Don't use it no matter what ;) Something in that .watermark is down right deadly to the IDE.

Once I new'd the object and shutdown the app, it seems so much better.

Hints I got:

Once it stops compiling, cancel the build and quit. No use in doing anything else.

Intellsense will work if you have not screwed up the compiler. If it is not working, it will not compile anything or fix anything either. Figure out what you did wrong - then save and get out. Don't even bother rebuilding or building. Figure it out and save.

Edit your vbproj files if you are adding and removing the OXC becuase its not working for you. TerryW said to stick with the dll for VB.NET. If you mess around adding references, go into the XML and remove the others. Only have one in there.

Everything seems to be working so far. Great!
dkwesley Posted - 05/03/2005 : 18:04:21
There are some things you need to change to get PrintPreview to work correctly in VB.NET.

Colors: vbBlue is a VB6 constant and is not in VB.NET you will have to use something like the following:
Preview.ForeColor = System.Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Blue))


If you try to use the WaterMark it will hang the editor.

Passing of the CurrentX or CurrentY values into the ParaText method will cause some problems and you will have to define a new variable to these and pass those into the method.

Dim CurrentY As Int32
CurrentY = Preview.CurrentY
Preview.ParaText("<ce>HV WINDING CONTINUED ON NEXT PAGE", , CurrentY)

but passing it into the AddTextAt method seems to work OK.
Preview.AddTextAt(Buffer, Preview.CurrentX, , , PrintPreview5.eAutoStep.prASCopypage)


When using the AddTextAt method and you need to pass one of the "pr" paramters along with it , you will have to do something like this:

Preview.AddTextAt(" ", , , , PrintPreview5.eAutoStep.prASCopypage)

You may find that you need to experiment around a little to get everything to work properly. But sofar everthing seems to work except for the WaterMark.


abales Posted - 05/01/2005 : 16:07:47
I edited out the ocx in the vbproj and made sure only the dll was present.

I get the following message box whenever I use more than about 5 lines inside a

With PrintPreview
....
End With

"Visual Basic .NET is unable to recover from the following error: System Error &HC00000005& Visual Basic Internal Compiler. Save your work and restart Visual Studio .NET"

Also these prSTExternal (the pr's) and vbBlue (vb's) are not defined. Are these vb6 defines?
abales Posted - 04/30/2005 : 16:03:04
These wild errors include -

Compile doesn't get an error, but never returns.
You lose the reference and the smart editor no longer works. It no longer fills in the text for you or knows anything at all.
You have to close the application and restart .net.
abales Posted - 04/30/2005 : 16:01:20
1) Add a reference worked. I can add either the ocx or the dll.
2) "Imports PrintPreviewOCX.PreviewClass" or the dll statement works also.
3) "Public WithEvents Preview As PrintPreviewOCX.Preview" works too.
4) "With Preview" & "End With" and then using some of the fields like the example has (in fact I copied some of the button click examples out) causes wild errors in the .NET compiler.

This is VB.NET running VB on .NET 2003 environment, .net Framework 1.1

Print Preview ActiveX © Mandix Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000 Version 3.4.02