Is this a framework question? vs a VB.Net question?
I'm getting an unhandled exception in oPreview that isn't caught by the
Try. Any ideas on how surround this puppy??
<SNIP>
Dim oPreview As PrintPreviewDia log
....
If oJobReport Is Nothing Then
oJobReport = New PrintDocument
End If
AddHandler oJobReport.Prin tPage, AddressOf PrintJobRptPage
AddHandler oJobReport.Begi nPrint, AddressOf PrepareJobRepor t
'AddHandler oJobReport.EndP rint, AddressOf JobReportFini
If bPrintPreview Then
oPreview = New PrintPreviewDia log
oPreview.Docume nt = oJobReport
Try
oPreview.ShowDi alog()
Catch ex As Exception
MsgBox("Print Preview Exception" & vbCrLf & ex.ToString())
End Try
....
<SNIP>
Output of the details of the exception, happened on the .ShowDialog() not in
the Catch...
I don't understand the configuration information on the bottom on output.
This is being run in Debug mode, but all you can do is Continue or Ignore.
<OUTPUT from error>
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullRefe renceException: Object reference not set to an instance of an
object.
at System.Windows. Forms.PrintPrev iewControl.Calc ulatePageInfo()
at System.Windows. Forms.Control.I nvokeMarshaledC allbacks()
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase:
file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
rrprt_cl
Assembly Version: 1.0.1821.16933
Win32 Version: 1.0.1821.16933
CodeBase:
file:///C:/Documents%20and %20Settings/Max/My%20Documents/Visual%20Studio %20Projects/rrprt/rrprt_cl/bin/rrprt_cl.exe
----------------------------------------
System.Windows. Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase:
file:///c:/windows/assembly/gac/system.windows. forms/1.0.5000.0__b77 a5c561934e089/system.windows. forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77 a5c561934e089/system.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase:
file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77 a5c561934e089/system.data.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03 f5f7f11d50a3a/system.drawing. dll
----------------------------------------
Microsoft.Visua lBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.6001.4
CodeBase:
file:///c:/windows/assembly/gac/microsoft.visua lbasic/7.0.5000.0__b03 f5f7f11d50a3a/microsoft.visua lbasic.dll
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03 f5f7f11d50a3a/accessibility.d ll
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config ) must have the
jitDebugging value set in the system.windows. forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuratio n>
<system.windows .forms jitDebugging="t rue" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
<END of OUTPUT from error>
--
Max
ma*@m99c.com