Autor Beitrag
csigg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 20.04.05 10:50 
ist es möglich die Grösse meiner Form selbstzubestimmen bzw. eine Maximierung zu erzwingen??
ich möchte mein Programm entweder ganz Groß/Maximiert oder garnicht minimiert anzeigen lassem, wie geht das??
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8549
Erhaltene Danke: 478

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 20.04.05 10:54 
Im ObjektInsektor:
windowState auf 'wsMaximized'; und BorderIcons-biMaximize auf False

_________________
We are, we were and will not be.
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 20.04.05 10:59 
und dann kann man es nichtmehr kleiner machen??
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8549
Erhaltene Danke: 478

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 20.04.05 11:10 
Ich wüßte jetzt auf Anhieb nicht, wie man das anstellen könnte. Irgendwelche Tricks gibts aber dann bestimmt noch.

_________________
We are, we were and will not be.
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 20.04.05 11:14 
eben, die weiss ich auch nicht, und drum frag ich ka :)
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 20.04.05 12:01 
Zwei Varianten zum vermeiden der Größenänderung:
1. Schau mal im OI unter Constraints. Dort gibt es MinHeight und MinWidth. Das ist aber abhängig von der Bildschirmauflösung. Sollte dann also erst zur Laufzeit gesetzt werden (wenn Maximized, dann hast du die Größe ja).
2. Ereignis OnCanResize: Wenn du dort Resize := False setzt, dürfte eine Größenänderung nicht mehr möglich sein.

P.S.: Das hättest du aber auch mal selbst im OI prüfen können. :wink:
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 20.04.05 12:44 
Dann sollte ich aber noch wissen wie ich die aktuelle, bzw. größtmögliche Auflösung herausfinde??
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 20.04.05 12:49 
user profile iconcsigg hat folgendes geschrieben:
Dann sollte ich aber noch wissen wie ich die aktuelle, bzw. größtmögliche Auflösung herausfinde??

Darum schrieb ich doch:
Zitat:
Sollte dann also erst zur Laufzeit gesetzt werden (wenn Maximized, dann hast du die Größe ja).
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 20.04.05 12:51 
aber das Programm sollte für verschieden Auflösungen funktionieren, dann kann ich ja keine festen Werte eingeben. kann man über Maximized nicht die aktuellen Werte auslesen??
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Mi 20.04.05 12:53 
Setzt doch einfach die Einstellungen für die Ränder anders (im OI!!!!!!!!). Ich glaub die Property heißt BorderStyle. Wenn man die auf bsSingle setzt, ist man das Thema auch ohne Auflösungsgeschichten los. ---> WindowsState := wsMaxyimized; BorderStyle := bsSingle; und natürlich noch den Button für maximieren deaktivieren

_________________
Programmers never die, they just GOSUB without RETURN
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 20.04.05 12:54 
Zur Laufzeit!!!! kennst du die größe des Fensters, wenn es Maximiert ist. Damit kannst du dann zur Laufzeit(!) die MinHeight und MinWidth setzen.
Nicht zur Designzeit. Du brauchst das nicht vorher wissen.
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Mi 20.04.05 12:58 
Also ich versteh euer Problem grade net. In meinem Aktuellen Programm, habe ich genau diese Optionen zur Designzeit gesetzt (bei mir BorderStyle auf bsNone, hat aber einen anderen Grund). Das Fenster ist dann ständig maximiert. Muss jetzt aber schluss machen (essen).
Ciao!

_________________
Programmers never die, they just GOSUB without RETURN
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 20.04.05 13:01 
@alias5000:
das war nicht auf deine Antwort bezogen. Unsere Antworten hatten sich nur überschnitten. Daher das Missverständnis.
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 20.04.05 13:04 
Sorry, ich blicks jetzt grad nicht,
ich habe den Befehel wsMaximized,.....
und dann kommt minHeight := ???
und maxheight := ???
...
und was weis ich denen jetzt zu??
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 20.04.05 13:18 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
  if Form1.State := wsMaximized then begin
    Form1.MinHeight := Form1.Height;
    Form1.MinWidth := Form1.Width;
  end;

Ungetester Source!
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 20.04.05 13:23 
danke.
ein bisschen nachdenken könnte zwischendurch auch mal nicht schaden.
So kompliziert wär das eigentlich nicht gewesen, drauf zu kommen das in height die Höhe und in width die Breite steht :)
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 20.04.05 13:25 
Das dachte ich auch. Darum waren meine Erklärungen auch so knapp gehalten. :angel:
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 20.04.05 13:30 
hab mir grad immer gedacht das muss doch irgendwie gehn, wär aber nie drauf gekommen es so zu machen :D
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Mi 20.04.05 15:55 
So hab jetzt feertig gegessen :D (15:42) :D . Trotz allem würde ich noch den BorderStyle auf bsSingle oder bsNone setzen, weil sonst der User die Größe verändern kann (außer man benutzt die OnCanResize Procedure...
@Jasocul Missverständnisse passieren, iss mir hinterher auch aufgefallen, dass das anders gemeint sein könnte...

_________________
Programmers never die, they just GOSUB without RETURN
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 20.04.05 16:07 
@alias5000:
wie langsam isst du denn?
Mit dem Borderstyle ist natürlich auch eine gute Möglichkeit, wenn das etwas andere Aussehen akzeptieren kann. Das OnCanResize wäre mein persönlicher Favorit gewesen.
Ist aber alles eine Geschmackssache.


Zuletzt bearbeitet von jasocul am Mi 20.04.05 16:19, insgesamt 1-mal bearbeitet