We are currently pre-testing an application with Application Verifier before getting it certified for Windows Vista. The application contains a Windows Form with an Ultra Grid, UltraPrintPreviewDialog and UltraGridPrintDocument controls. Under normal conditions all works well.
When running the application under Application Verifier and during the selection of a button that sends the grid data to a Print Preview Dialog, the Print Preview window appears but with no data and a message stating "No Printers Are Installed"
Might someone lend some advice on what within the use of PrintPreviewDialog might be causing this issue? I've included the code below.
)
SourceGrid
"Employee"
UltraGridPrintDocument1.Grid = ugEmployee
UltraGridPrintDocument1.DefaultPageSettings.Landscape =
True
UltraGridPrintDocument1.DefaultPageSettings.Margins.Left = 0.25
UltraGridPrintDocument1.DefaultPageSettings.Margins.Right = 0.25
UltraGridPrintDocument1.DefaultPageSettings.Margins.Top = 0.25
UltraGridPrintDocument1.DefaultPageSettings.Margins.Bottom = 0.25
UltraGridPrintDocument1.Header.TextLeft =
"Employee Information"
"Substitute"
UltraGridPrintDocument1.Grid = ugSubstitutes
"Substitute Information"
Select
UltraGridPrintDocument1.Footer.TextLeft =
.Today.ToString
UltraPrintPreviewDialog1.Document = UltraGridPrintDocument1
UltraPrintPreviewDialog1.ShowDialog(
Sub
I'm not familiar with Application Verifier.So I can't say how it works or why it would be causing an error here.
I assume, since you are reporting this as a problem, that there actually are printers installed on the machine?
Is it possible that Application Verifier is testing to make sure the application does not crash when no printers are installed, and therefore the behavior you are seeing is correct?
Application Verifier is a Microsoft Product that is used to test your code for various issues. When you submit an application to Microsoft for Certification, ie Certified for Windows Vista, the testing facility, normally Lionbridge, will run this tool against your code to test for miss use of Windows Resources like Heaps, Locks, and Handles. Even though Application Verifier is designed for use with unmanaged code, they still use it for the Resource testing. They also use FXCop for testing of managed code issues.
To answer your question, yes the environment we doing our Pre-Certification testing on does have printers installed. When the Application Verifier is turned off, the preview works just fine, it's only when we have it turned on and it's testing Resources that we get the response from the preview window that 'No Printers are installed'
As part of the ISV product Certification process, you test your product usign a number of steps and processes then submit it to Lionbridge and they perform the test. If you product fails the test your allowed to rework and correct problems but have to pay a re-test fee which of course we're trying to avoid happening.
If you would like more information on the ISV product testing process I can provide you with the Microsoft documents or you can also check the Lionbridge web site.
Hi,
Without more specific information about what's going on here, I'm not sure what we can do here.
Do you have a stack trace of the error? Or even the exact error message? I searched our source code for the string you listed here - "No Printers Are Installed", but I could not find this anywhere in our code. My guess is that this error message is coming from the PrintDocument class, from which UltraGridPrintDocument is derived, and is not related to the Infragistics components at all.
The fact that you do not get the error when the verifier is turned off seems to be an indication that there's a problem with the verifier, doesn't it? It must be doing something to alter the environment in such a way that the application can't find any printers.
Mike,
I've attached the log file from Application Verifier. Hope you can make sense of it.
I agree with you I believe the "No Printers Are Installed" is coming from the UltraGridPrintDocument. From the event that is fired in my previous post, there is never an exception fired. The Preview window eventually appears, with no data displayed only the message "No Printers Are Installed" shows up in the center of the viewer where the document would be. Even though no exception is fired and displayed to the user, it appears that the Application Verifier does catch an error and writes it to the log.
Thanks for your assistance. I think at this point we'll take another approach when it comes to printing data from the grid so we can get this product off to Microsoft for testing.
curtbroyles said:I've attached the log file from Application Verifier. Hope you can make sense of it.
I took a look, but this means nothing to me. I don't even see the error message here.
curtbroyles said:I agree with you I believe the "No Printers Are Installed" is coming from the UltraGridPrintDocument.
I'm pretty sure I said just the opposite. This message is coming from the PrintDocument class. UltraGridPrintDocument derives from PrintDocument, with is part of the DotNet framework.