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.