Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Width in VB6 (https://www.delphipraxis.net/102013-width-vb6.html)

hoika 22. Okt 2007 09:28


Width in VB6
 
Hallo,

ich benutze eine COM-Komponente,
deren Dokumentation leider nur in VB ist.

Der Code:
MyComponent.Width:= Form.Width.

führt nicht zum gewünschten Ergebnis (Komponente an das Form anpassen).
Kann es sein, dass Width unter VB nicht das gleiche ist wie unter Delphi.


Heiko
PS: Ich hatte mal sowas wie Twips im Kopf.

Flocke 22. Okt 2007 10:02

Re: Width in VB6
 
Zitat:

Zitat von hoika
Ich hatte mal sowas wie Twips im Kopf.

Korrekt - 20 Twips = 1 Point. Probiere mal den Faktor 20 (VB.Width = 20 * Delphi.Width).

Nachtrag: Korrekterweise solltest du so rechnen:
Delphi-Quellcode:
VBControl.Width := MulDiv(PixelWidth, 20 * Screen.PixelsPerInch, 72);


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:14 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz