Autor Beitrag
Ryazor
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29



BeitragVerfasst: Di 22.04.03 12:07 
Hi Leutz!
Ich hab schon öfters bei Anwendungen gesehn, dass man ein Fenster nur bis zu einer bestimmten Größe resizen konnte... Das wäre für mein jetziges Projekt ziemlich elegant, aber ich wüsste nich, wie ich das so gut lösen kann, wie bei diesen Programmen.
Ich bin für Hilfe, wie immer, sehr dankbar :D
TheNeon
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 408

Windows
VS2010 C#
BeitragVerfasst: Di 22.04.03 12:16 
ich weiß nicht, ob es eleganter geht, aber ich habs so gemacht: 8)

ausblenden Quelltext
1:
2:
3:
4:
5:
procedure TForm.FormResize(Sender: TObject);
begin
  if (Form.width<wertw) then begin Form.width:=wertw; abort; end;
  if (Form.height<werth) then begin Form.height:=werth; abort; end;
end;
Ryazor Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29



BeitragVerfasst: Di 22.04.03 12:24 
Jo THX erstmal...
Sowas hab ich mir auch schon überlegt, allerdings kann es nicht die "ultimative Lösung" sein ;)
Schließlich bricht dieser Code, sobald die min Breite/Höhe erreicht wird, den Vorgang ab, d.h. dass man dann nicht weiter verschieben kann, is ja logisch :)
Aber ich will ja erreichen, dass man normal verschieben kann bis zu einer Breite/Höhe, aber ohne Abbruch. Wenn ich das Abort weg nehme, flackert das Fenster schön...
Naja, trotzdem erstmal THX!
LCS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1305
Erhaltene Danke: 1

WIN 7, WIN 8
Delphi XE5, Delphi XE, Delphi 2007
BeitragVerfasst: Di 22.04.03 12:25 
Hi
ab Delphi 6 hat auch jedes Formular die Eigenschaft Contraints, mit der du Minimal- und Maximal-Grösse festlegen kannst.

Gruss Lothar

_________________
Der BH ist für die Brust, der Plan ist für'n Ar...
Ryazor Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29



BeitragVerfasst: Di 22.04.03 12:55 
HEY!
Genau sowas hab ich gesucht! Vielen, vielen Dank! :D :D
Loht sich wirklich, dieses Forum :D
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Di 22.04.03 13:06 
Korrektur: die Eigenschaft Constraints gibt es nicht erst ab Delphi6 sondern schon viel früher (für alle Nicht-Delphi6-Besitzer ;) )

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
TheNeon
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 408

Windows
VS2010 C#
BeitragVerfasst: Di 22.04.03 22:48 
wieder eine Funktion von der ich weiß, dass es sie nun gibt :roll:

Moderiert von user profile iconTino: Buchstabensalat entfernt.
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Mi 23.04.03 19:22 
Hallo Ryazor!

Leider wird bei mir (Win98, Delphi5) das Vergrößerungsviereck nicht in seiner Größe eingreschränkt, dass heisst es sieht so aus als könne man das Programm ganz klein machen und wenn man es versucht, bleibt es einfach so (schwer zu erklären).

Auf jedenfall ist das ein sehr unschöner Effekt, denn man per Auswertung der Message WM_GETMINMAXINFO unterbinden kann!

Gruß wulfskin!

Moderiert von user profile iconTino: Tags korrigiert.

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.