jdsouza
Board Regular
- Joined
- Jul 19, 2012
- Messages
- 105
I have a new notebook PC which has a 3200 x 2000 resolution. Recommended Scaling is 200%. Screen ratio is 16:10.
I have used VBA code to fetch the screen dimension, convert the fetched data to points. Subtract from it the userform width and thereby set its position to the right edge of the screen. On this new PC, the userform is sent approx 125 points too far to the left ( the right portion spills out of the screen). Even though I can see the maths working OK during the debug mode (the correct screen size, the correct userform width and the correct subtracted result is obtained), the userform is not painted at the correct distance from the left edge.
I have a suspicion that the userform is drawn wider than the set width. (I gather this when observing another userform which has a listview. There is more space to the right of the listview than expected - more space after the last column than designed). But the measurement of the userform in the VBE IDE debug mode returns the set dimensions.
Would appreciate any help with resolving this.
I have used VBA code to fetch the screen dimension, convert the fetched data to points. Subtract from it the userform width and thereby set its position to the right edge of the screen. On this new PC, the userform is sent approx 125 points too far to the left ( the right portion spills out of the screen). Even though I can see the maths working OK during the debug mode (the correct screen size, the correct userform width and the correct subtracted result is obtained), the userform is not painted at the correct distance from the left edge.
I have a suspicion that the userform is drawn wider than the set width. (I gather this when observing another userform which has a listview. There is more space to the right of the listview than expected - more space after the last column than designed). But the measurement of the userform in the VBE IDE debug mode returns the set dimensions.
Would appreciate any help with resolving this.