解像度の変更


たくろー  2008-02-20 10:44:28  No: 100329  IP: 192.*.*.*

lngIndex = 0&

Do While EnumDisplaySettings(vbNullString, lngIndex, dev(lngIndex)) <> 0
    lngIndex = lngIndex + 1
Loop

'画面の幅と高さのみ変更

For i = 0 To lngIndex
    If dev(i).dmPelsHeight = 600 And dev(i).dmPelsWidth = 800 And dev(i).dmBitsPerPel = 16 Then
        r& = ChangeDisplaySettings(dev(i), 0)
        Exit For
    End If
Next i



IFの条件式なのですが、
dmBitsPerPel = 16  だとScreen.width = 12000となってくれるのですが
dmBitsPerPel = 32  だとScreen.width = 9000になってしまします。

解像度が800*600は  Screen.width = 12000  だと思いますがなぜでしょうか?

編集 削除
大吉末吉  2008-02-20 13:24:39  No: 100330  IP: 192.*.*.*

> 解像度が800*600は  Screen.width = 12000  だと思いますがなぜでしょうか?
これは、DPI設定が「通常のサイズ(96DPI)」の時ですよね?
#つまり、Screen.TwipsPerPixelXが15(=1440[Twips/Inch] / 96[DOT / Inch])のとき。

DPIが「大きなサイズ(120DPI)」だと、
#つまり、Screen.TwipsPerPixelXが12(=1440[Twips/Inch] / 120[DOT / Inch])のとき。
は、Screen.width = 9600になりますが・・・

> Screen.width = 9000
だと、逆算すると、128DPIか・・・

編集 削除