Moin Forum,
kann man irgendwie die tatsächliche Auflösung des Monitors in ppi ermitteln?
Wenn ich zum Beispiel das ausführe:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
| function Screen_ppi: Integer; var DC: HDC; begin DC := GetDC(GetDesktopWindow); try Result := GetDeviceCaps(DC, LOGPIXELSX); finally ReleaseDC(0, DC); end; end; |
bekomme ich einen Rückgabewert von 96ppi (Das finde ich auch in der Systemsteuerung).
Das bedeutet doch wenn ich jetzt zum Beispiel ein TPanel mit einer Breite von 960 Pixeln auf meiner Form habe sollte es auf dem Monitor eine Breite von exakt 10 Zoll haben, oder? Tatsächlich sind es allerdings nur 7,55 Zoll. Wenn ich dann mal rückwärts rechne komme ich auf 127ppi.
Kann mir das mal jemand erklären?
Gruß Oliver
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...