Autor Beitrag
JJ
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: Mi 06.09.06 15:05 
Hallo! Ich muss ein objekt von der größe her einer Form anpassen. Leider überlappt das immer und macht mir blöde Scrollbars. Leider brauche ich den Borderstyle.... also muss ich ihn vorher immer irgendwie abziehen. Ich weiß dass ich von der Breite her etwa 8 und von her höhe etwa 28 abziehen muss. Doch das ist von XPstyle zu SPstyle anders. Kann mir hier jemand sagen wie ich den einfach ermitteln kann?

_________________
Hallo!
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 06.09.06 16:44 
Generell hilft bei sowas GetSystemMetrics. Wahrscheinlich kommst du mit GetSystemMetrics(SM_CXBorder); weiter. Die anderen Konstanten gibts z.B. bei MSDN.

Edit: Oder reicht es nicht einfach, ClientHeight bzw. ClientWidth zu benutzen?

_________________
We are, we were and will not be.
JJ Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: Mi 06.09.06 19:59 
mal ganz doof fragen .... was is denn der unterschied zwischen clientwidth und width

_________________
Hallo!
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 06.09.06 20:02 
Das eine ist mit, das andere ohne den Rahmen, der von Windows drumrum gemalt wird. Ob Sachen wie Hauptmenü, Statusbar und Scrollbalken da mit drin sind, weiß ich grad nicht. :nixweiss:

_________________
We are, we were and will not be.
JJ Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: Do 07.09.06 16:26 
loool wie cool ... es hat auf anhieb funktioniert! Vielen Dank :)

_________________
Hallo!