Autor Beitrag
Joker_07
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: So 13.07.08 11:12 
ich möchte, wenn ich bei image1 width und height veränder soll sich dann das bild verkleinern oder vergrößern je nach dem,
ihr kennt vielleicht bei gimp oder so wenn man das fenster vergrößert vergrößert sich das bild auch (also der inhalt des images1), ich danke schon im vorraus

mfg Joker_07


Moderiert von user profile iconGausi: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am So 13.07.2008 um 12:16
gfehmke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 24



BeitragVerfasst: So 13.07.08 11:22 
Hi

Die Eigenschaft 'Stretch' von Image1 auf True setzen.

G.
Joker_07 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: So 13.07.08 11:31 
ja das hab ich bereits probiert geht leider aber nicht
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 13.07.08 12:06 
Du musst wahrscheinlich das dargestellte Bitmap auch mit vergrößer / verkleiner.
Tilman
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1405
Erhaltene Danke: 51

Win 7, Android
Turbo Delphi, Eclipse
BeitragVerfasst: So 13.07.08 12:09 
Vermutlich musst du noch image1.allign := alClient; setzen.

_________________
Bringe einen Menschen zum grübeln, dann kannst du heimlich seinen Reis essen.
(Koreanisches Sprichwort)
matox
Hält's aus hier
Beiträge: 4
Erhaltene Danke: 1

XP
Delphi 7.0 Personal
BeitragVerfasst: Do 24.07.08 08:51 
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, jpeg, StdCtrls;

type
TForm1 = class(TForm)
    Image1: TImage;
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;
  i:Integer;
implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);

begin
  Image1.Stretch := True;
  Image1.Width := 0;
  Image1.Height := 0;
  Doublebuffered := True;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
    for i := 1 to 200 do
     begin
        application.ProcessMessages;
        Image1.Width := image1.Width + 1;
        Image1.Height := Image1.Height + 1;
        sleep(10);
     end;
   for i := 1 to 200 do
     begin
        application.ProcessMessages;
        Image1.Width := image1.Width - 1;
        Image1.Height := Image1.Height - 1;
        sleep(10);
     end;
end;

end.


Moderiert von user profile iconGausi: Code- durch Delphi-Tags ersetzt (und korrigiert).