Infopath support for high DPI display settings

P

Peter Ghali

I have in Infopath form with a complex design in terms of layout tables and
graphics. The form template, which appears correct on my machine, is
distorted and unusable on all of our new high-end machines.

I discovered that the new machines have their DPI setting (accessed via the
"Advanced" button in the display properties dialog box) to 200%. This setting
allows the screen resolution to be cranked-up (1600 x 1200 in this case)
while maintaining large legible font sizes.

As seen in the link below, Internet Explorer addressed this issue in version
6.0 with a feature called scaling, which can be activated manually via a
registry setting.

http://msdn.microsoft.com/workshop/author/dhtml/overview/highdpi.asp

But even though Infopath uses IE's rendering engine, it doesn't seem to
inherit this behavior. This will be a big support issue, as many new
machines will come factory-set with the high-dpi setting.

Any thoughts?
 
B

becky

I also have a problem with InfoPath forms on machines using large DPI.
It involves table columns that ignore the established width and
therefore word wrap in an odd place. I have struggled with this for
some time.

I may have finally found a solution. Peter, in the link you mentioned,
the article referred to another article 'How to Write High-DPI
Applications'
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dngdi/html/highdpiapp.asp
Under the section 'Visual Basic and the Common Language Runtime', it
says "In Microsoft .NET WinForms (used by Visual Basic .NET),
everything is done in pixels. When a form is first created, however,
the controls will be scaled based on the systems DPI, and initial form
layout scales well."

So, I set my dev machine on the larger DPI and modified a view within
the InfoPath form. I only had to temporarily add a new table with the
same column widths as all my other tables that were getting screwed up.
It apparently scaled everything based on the larger dpi. I published
the new template. Now machines with normal DPI as well as the larger
DPI that was tested appear as desired.
 
P

Peter Ghali

Thanks for the reply Becky. After more testing, I think I've reproduced your
results, but I've arrived at a different conclusion.

In my Infopath form, all sizes are defined explicitly in pixels. The
dimensions of the layout tables, including row and column heights are
expressed in pixels. Textboxes are exactly 21px high.

I cranked-up my dpi setting and viewed the form. Textboxes were too short
for any characters to be visible. Nothing appeared to have been scaled. If
this were Internet Explorer, I would have seen everything scaled larger to
accomodate the larger font size. But Infopath didn't do that. Even putting
the form in design view (while my machine was at the high dpi setting) and
altering the form as you suggested, didn't cause the layout tables or
textboxes to scale.

Then I tried something different. I changed the 'height' of my textboxes to
'auto' instead of the explicit '21px' declaration I had used before. With
this setting, Infopath appears to scale the height of the textbox based on
the dpi setting of the machine. This produced a much more desirable result.
However, this meant that textboxes would scale in height, but other elements
(say, the column width of a layout table) would not. As a result, the form
appears distorted--but at least its usable.

I'm not sure if this completely solves my problem, or if I'm in for a bunch
of technical support calls from my users. But its a start. Thanks...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top