Autor Beitrag
XHFire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Fr 26.10.07 21:17 
Hallo.

Ich komme von C++ und möchte mal wieder etwas mehr in Delphi arbeiten.
Jedoch bleibe ich schon jämmerlich an dem Versuch, ein Formular in der Mitte meines Desktops anzuzeigen, hängen. So ging es in C:
ausblenden Delphi-Quelltext
1:
Form1->Left = Screen->Width/2 - Form1->Width/2					

Delphi mag jedoch keine Integer-Werte teilen.
Wie gehe ich hier vor?
Danke
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Fr 26.10.07 21:19 
Hi,

ausblenden Delphi-Quelltext
1:
 Form1.Width div 2;					

:wink:

Gruß
XHFire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Fr 26.10.07 21:34 
Ahhh. Super :).
Und wie löse ich folgendes:
ausblenden Delphi-Quelltext
1:
2:
C++
Form1->CheckBox1->Checked = !Form1->CheckBox2->Checked;

Gibt es in Delphi auch so etwas wie dieses Ausrufezeichen in C, welches einen Wert negiert?
McFarlane
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 68

WIN XP Prof.
Delphi 2005 PE, Turbo Delphi 2006, PHP (Eclipse)
BeitragVerfasst: Fr 26.10.07 21:43 
joa, da müsste ein "not" gehen.

_________________
21 ist nur die halbe Wahrheit...
XHFire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Fr 26.10.07 21:52 
Funktioniert ;).
Meine Threads könnt ihr ruhig wieder löschen.
Werde sicher noch so einige lustige Fragen haben :).

Danke für die schnellen Antworten.
Gruß, Fire
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 26.10.07 22:27 
Moin und :welcome: im Forum!

user profile iconXHFire hat folgendes geschrieben:
Jedoch bleibe ich schon jämmerlich an dem Versuch, ein Formular in der Mitte meines Desktops anzuzeigen, hängen.
Stell einfach die Eigenschaft .Positiondes Formualars im ObjectInspector auf poScreenCenter, dann kümmert sich das Formular selbst darum. :idea: ;)

cu
Narses

PS: Kleiner Hinweis noch am Rande: bitte nur eine Frage pro Topic; es gibt nur Chaos, wenn mehr als eine Frage (die nicht thematisch zusammen gehören) in einem Thread behandelt werden! :? Danke. ;)

_________________
There are 10 types of people - those who understand binary and those who don´t.
XHFire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Fr 26.10.07 22:47 
Oki doki :)