Re: Splash Screen and Image Control Problem



Here is some addition information about the bitmap which I'm using an image
control over my form with the dimensions I gave you in previous post:

Image height = 331
Image width = 434
Horizontal DPI = 71
Vertical DPI = 71




"dm4714" <spam@xxxxxxxx> wrote in message
news:uOoKPYMTFHA.2128@xxxxxxxxxxxxxxxxxxxxxxx
> Hi -- I know I'm a bit dense and I understand what you did... I just don't
> understand how I fix this in my situation.
>
> I just tried running the program on both a 96DPI and 120DPI screen. Here
> is what the Height/Width properties are:
>
> DPI96 (small fonts):
> Height =4965
> Width = 6510
> ScaleHeight = 4965
> ScaleWidth = 6510
>
> DPI120 (large fonts):
> Height = 4968
> Width = 6504
> ScaleHeight = 4968
> ScaleWidth = 6504
>
> Now, I tried using your code, and I'm not sure what or where to use the
> results. I would think I have to somehow adjust the frmSplash properties
> to new width/height values or perhaps the scaling. I'm not sure if I need
> to replace with new values or add to what I already have.
>
> Any help or further explanation would be greatly appreciated.
>
>
>
>
> "Randy Birch" <rgb_removethis@xxxxxxxx> wrote in message
> news:Onls1cHTFHA.2096@xxxxxxxxxxxxxxxxxxxxxxx
>> The dell machine is using large fonts; you're using small fonts. A twip
>> is a
>> twip and has nothing to do with resolution. If the image you load is,
>> say,
>> 300x400 pixels, then it will be 300x400 pixels regarless as to the screen
>> size, resolution or font size. What will change is the size of the pixel,
>> so
>> 300 pixels looks "smaller" on a 96 DPI screen than on a 120 DPI screen.
>> But
>> the measurement itself does not change.
>>
>> That said, you do have to account for the fact a form hard-coded to a
>> specific size, stretching an image control to it's client area, may cause
>> the image to stretch or appear off-centre (depending on the settings on
>> the
>> image control). That is what you have to account for, and you can
>> determine
>> the DPI prior to loading your form by a simple api call:
>> http://vbnet.mvps.org/code/screen/screenfont.htm. If the result is 96 use
>> your normal values. If the result is <> 96, then divide the result by 96
>> to
>> get the "scaling factor", and multiply the width and height by that
>> factor
>> to get the required area.
>>
>>
>> Private Sub Command1_Click()
>>
>> Dim dpi As Long
>> Dim factor As Single
>>
>> Dim defWidth As Long
>> Dim defHeight As Long
>>
>> defWidth = 300
>> defHeight = 400
>>
>> 'dpi = <result of API call>
>> dpi = 96 'assume it returns 96
>> factor = dpi / 96
>>
>> Debug.Print factor, defWidth * factor, defHeight * factor
>>
>>
>> dpi = 120 'assume it returns 120
>> factor = dpi / 96
>>
>> Debug.Print factor, defWidth * factor, defHeight * factor
>>
>> End Sub
>>
>> output:
>>
>> 1 300 400
>> 1.25 375 500
>>
>>
>> --
>>
>> Randy Birch
>> MS MVP Visual Basic
>> http://vbnet.mvps.org/
>> ----------------------------------------------------------------------------
>> Read. Decide. Sign the petition to Microsoft.
>> http://classicvb.org/petition/
>> ----------------------------------------------------------------------------
>>
>>
>>
>> "dm4714" <spam@xxxxxxxx> wrote in message
>> news:uCHlvIHTFHA.3308@xxxxxxxxxxxxxxxxxxxxxxx
>> :I have a VB6 form that starts up in middle of screen. The scale mode is
>> "1
>> : twip" and the scale height is 4965 and scale width is 6510. The height
>> of
>> : the form is 4965 and the width is 6510.
>> :
>> : I also have an image control overlaying the entire form. It's height is
>> 4965
>> : and width is 6510.
>> :
>> : The image displays fine on my PC and any PC that is using a 96 DPI size
>> : font.
>> :
>> : On some laptops with wide screens, it would appear that Dell sets the
>> font
>> : to 120 DPI.
>> :
>> : The problem is, my form is not larger than my image, and looks very
>> tacky
>> : when it appears. Again, on a normal desktop with a 96 DPI font, the
>> form
>> : and image are exactly the same size.
>> :
>> : How do I adjust my form with/height to account for the difference in
>> DPI
>> : without having to adjust or stretch my image?
>> :
>> : Any sample code or explanations would be appreciated.
>> :
>> :
>> :
>>
>
>


.



Relevant Pages

  • Re: screen resolution, font size and real estate
    ... If xdpyinfo shows 76 dpi, this is most probably false (unless you have ... your fonts might actually look screwed in some ... I tried making the changes in the gnome dialog as well after installing ... # -- THEME AUTO-WRITTEN DO NOT EDIT ...
    (Debian-User)
  • Re: [SLE] Menu font for Firefox almost fixed
    ... set the screen resolution but nothing for the dpi. ... I am supposing from ... > absolute sizes, not UI fonts. ... After doing that xdpyinfo reported screen resolution as 1600x1200 (no ...
    (SuSE)
  • Re: screen resolution, font size and real estate
    ... your fonts might actually look screwed in some ... I tried making the changes in the gnome dialog as well after installing 140MB of it - I'm afraid I didn't get anywhere, but wierdly there is a dialog box there for fonts with an input box for dpi - and when I increased the given dpi from 96 upwards, the text on the dialog box got bigger! ... # -- THEME AUTO-WRITTEN DO NOT EDIT ...
    (Debian-User)
  • Re: adjusting fonts to computers dpi settings
    ... After watching my app under 120 dpi I came to conclusion that if I summarily ... change the font to MS Serif and decrease font size to 6 ... How can I do that without accessing each control separetely? ... as Control Panel and the programs within it) or Windows ...
    (microsoft.public.vb.general.discussion)
  • Re: CButton and CEdit controls size is different between 96 DPI and 120 DPI for the same number of p
    ... and you have to resize the dialog, to the limits of the screen size. ... any control when resized, but it seems not working for changing DPI. ...
    (microsoft.public.vc.mfc)