Wrox Programmer Forums
|
VB Components Issues specific to components in VB.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 8th, 2006, 10:46 AM
Registered User
 
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default dll Error

Hi

I have an application in vb.net 2003 and his had a references of class in vb 6. This Class print a document using .PrintReport Method an this exception is called

"A first chance exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll"

Note: The Class have a preview of the report and all is fine, the problem is with i want to print. The only diferences between the preview and the print is the code of .printReport

If ShowDialog Then
    DataForm.Show vbModal
Else
    DataForm.PrintReport False

End If

 
Old August 8th, 2006, 11:51 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I suspect that the printing routine is attempting to obtain a reference to a non-existent printer (that is, some specific printer model/name which is not present on the computer), so the reference comes back Null.
 
Old August 8th, 2006, 12:00 PM
Registered User
 
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

But, the rutine start and print many document, and then call the error. The error can be called when his print 1 page or sometimes when print 3 pages, is random.

 
Old August 8th, 2006, 04:52 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

What is the source of that which is being printed? (Database? Files in a folder? Content generated by the program?)

Do you have access to the source code?
Can you modify the DLL to try to fix the problem or track it down?
 
Old August 9th, 2006, 12:38 PM
Registered User
 
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, I have the sources. I edit that source and the error alway is coming out. The data if from the code in VB.Net 2003. The problem is in the Method .PrintData because the code have a preview is right







Similar Threads
Thread Thread Starter Forum Replies Last Post
Error adding DLL jayznz VS.NET 2002/2003 3 June 12th, 2008 12:15 PM
DLL Registry Error Nirmalakrishna VB Components 0 June 19th, 2006 06:10 AM
Error in mscorlib.dll soccers_guy10 Pro VB.NET 2002/2003 0 May 9th, 2005 02:46 AM
CLSID error in DLL Mcanic2k Beginning VB 6 2 March 11th, 2004 05:43 AM
Error capture from DLL c3r3al_kill3r Classic ASP Components 0 July 1st, 2003 05:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.