Thema: Delphi Image als Bedingung?

Einzelnen Beitrag anzeigen

Hellcat

Registriert seit: 27. Feb 2003
60 Beiträge
 
Delphi 6 Personal
 
#4
  Alt 27. Feb 2003, 15:38
Delphi-Quellcode:
 procedure TForm1.Image1Click(Sender: TObject);
var BitmapO: TBitmap;
begin
  if Image1.picture = schloss zu.bmp then
    begin
      BitmapO := TBitmap.create;
      BitmapO.LoadFromFile('schloss offen.bmp');
      Image1.Picture.LoadfromFile('schloss offen.bmp');
      bild := 1;
    end
  else
    begin
      BitmapO := TBitmap.create;
      BitmapO.LoadFromFile('schloss zu.bmp');
      Image1.Picture.LoadfromFile('schloss zu.bmp');
      bild := 0;
    end;
end;
  Mit Zitat antworten Zitat