Need help with display - URGENT -

Logicworks
09-13-2003, 06:46 PM
Hi All,

I need help !

I was about to release an application on Monday after
2 months of BETA testing on Win98/ME/2000, when a
really stange thing happened.
One of my test subjects ran the app on WinXP-Pro
and the screen components were scewed an out of place.

Example.
1)
The main form uses a .GIF image in the bckground which
is exactly the same size as the form (on the development
machine). On the XP machine, the form is 20% bigger than
the .GIF image. It's like the form image displayes bigger
but GIF stayed in the top left cornerleaving a gap arount the
right, and bottom of the image.

2)I used a picture box as a container to hold a matrix
of text boxes. The picture box is far to the right of its
original location.

3)If I open-and-close any other forms in the application,
the form closes but also creates an icon at the bottom
of the screen which does nothing. The more I open and close forms,
the more icons pile up at the bottom of the desktop.
After 3 or 4 form openings, the app. locks up !
(Auto redraw is turned on in all the forms.)

Funny thing is that it installs and works fine on
98/ME/2000.

Can anyone shed some light on this problem.
Should I be looking at XP, or perhaps the users's video card ??

Note #1
I tried other VB programs on the user's XP machine and they
too had malformed buttons and picture boxes that were larger
than originally designed.

Note #2
My dev. system is set at 1024X786 res. Same as the XP machine.
I also test other machines at 800x600 / 1024x786 and it works fine.
Dev system uses VB6, SP3

I'm at a loss as to what could be happening.
Deadline to meet !
Any Ideas ??????

Logicworks

Thinker
09-13-2003, 06:58 PM
You need to be checking the Screen.TwipsPerPixelX and Screen.TwipsPerPixelY
If they are different then you will see these strange size differences. Of
course that won't have anything to do with icons pilling up and the
program crashing so I have to assume that there are two different
problems here.

passel
09-13-2003, 07:01 PM
Check the Screen.TwipsPerPixelX and TwipsPerPixelY values. They are
probably differenct on the XP machine. You will need to adjust the
position of your controls because you are probably placing them in
Twip Coordinates.

The first thing you might want to try, is on the original machine, change
the form's scalemode to pixels, and the PictureBoxes scalemode to pixels.
Then recreate you executable on that machine. Then try the new
executable on the XP machine. I don't know if that will take care of all
of the problem, but it may fix some of it. The Form size itself will always
be in twips, so the form size may need to be adjusted at startup, using
the TwipsPerPixel values.

Logicworks
09-13-2003, 07:07 PM
Thinker,

Thanks for the idea.
Can you elaborate on the Twips per pixel thingy ?
Specifically, how do VB programmers ensure that the
placement of controls stay uniform over various computers.
Is 1024X786 not the same on all machines ?
If not, what has my XP user possibly changed to make his
machine different form all the others ?

Much appreciated,

Logicworks





You need to be checking the Screen.TwipsPerPixelX and Screen.TwipsPerPixelY
If they are different then you will see these strange size differences. Of
course that won't have anything to do with icons pilling up and the
program crashing so I have to assume that there are two different
problems here.

Thinker
09-13-2003, 07:13 PM
The things that change this number are actually changing the screen
DPI. By working with pixels (dots), you can keep the same size ratios
but everything will look smaller even for the same resolution.

Logicworks
09-13-2003, 07:34 PM
Passel and Thinker,

Thanks very much for the suggestions.
I will check it out

Logicworks



Check the Screen.TwipsPerPixelX and TwipsPerPixelY values. They are
probably differenct on the XP machine. You will need to adjust the
position of your controls because you are probably placing them in
Twip Coordinates.

The first thing you might want to try, is on the original machine, change
the form's scalemode to pixels, and the PictureBoxes scalemode to pixels.
Then recreate you executable on that machine. Then try the new
executable on the XP machine. I don't know if that will take care of all
of the problem, but it may fix some of it. The Form size itself will always
be in twips, so the form size may need to be adjusted at startup, using
the TwipsPerPixel values.

OnErr0r
09-13-2003, 07:39 PM
Just thought I'd mention that DPI is changed by changing Windows font size. I use Large which is 12 twips per pixel. Small is 15 and I think Extra Large is 8. Thank God MS dropped twips in .net.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum