PC Review


Reply
Thread Tools Rate Thread

Best way to deal with large size (120dpi) setting and restore window size?

 
 
jkristia
Guest
Posts: n/a
 
      2nd Jun 2006
I'm completely lost right now, and can't figure out how to solve
this problem.
I want my app and dialogs to show up in the same position and same size
as when they were closed.

For that I do the following.

In the constructor I call

Util.LoadPosition(control) which reads in the position and size

And in OnClosing I call

Util.WritePosition(control).

Now this works very well when using standard size fonts (no scaling).
The problem is when I use large font, once the form is created it is
scaled accordingly so when saved it is larger and next time it opens up
large, so it grows and grows.

I tried to add a scaling factor which I found from the main window by
getting the client size before and after base.OnLoad was called, and
use that scaling factor when storing the window size, but still the
size I store is different from what load.

For example if I load a dialog with size 300,300, then when closed the
size has been scaled to 381,362, and when scaled down using the scale
factor I found when the main app was loaded the resulting size is
298,294.

Any idea how this can be achieved so it works for both standard font
(96 dpi) and large font (120 dpi) setting?.

Thanks
Jesper

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Query window's font size is too large for window susan Microsoft Excel Misc 0 29th Sep 2009 07:35 PM
Setting the ideal TCP Window Receive Window size or buffer setting john Windows XP Performance 3 25th May 2009 02:59 PM
Large fonts setting (120DPI) Alex Glass Microsoft VB .NET 5 27th Jun 2005 04:45 PM
Large Window Size Tom Pamin Microsoft Outlook Discussion 0 11th Oct 2004 09:20 PM
quick launch icon size larger after 120dpi font experiment Doug Floer Windows XP Customization 0 5th May 2004 01:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:27 AM.