Autor Beitrag
Pepp3r
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 82



BeitragVerfasst: Mo 18.12.06 23:38 
hallo :)
Also, ich möchte so eine Art "MiniPaint" programmieren.
Ich habe auf Form1 ein Penal2 und darauf ein image1. Ich möchte per Button das image löschen
ausblenden Quelltext
1:
form1.image1.Free;					

und dann neu erstellen.
Und genau da stehen 3 große ??? über meinem Kopf, da ich nichtg weiß, wie man das neue image erstellt. Zur information: Der Button liegt auf Form2 und das image auf form1 :)


Zuletzt bearbeitet von Pepp3r am Di 19.12.06 09:12, insgesamt 1-mal bearbeitet
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Mo 18.12.06 23:58 
Image1:= TImage.Create;
Pepp3r Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 82



BeitragVerfasst: Di 19.12.06 00:08 
schön wärs
[Error] Unit2.pas(37): Undeclared identifier: 'TImage'
[Error] Unit2.pas(37): Not enough actual parameters
[Fatal Error] Unit1.pas(74): Could not compile used unit 'Unit2.pas'

:/
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 19.12.06 00:18 
Moin!

Suche in: Delphi-Forum, Delphi-Library IMAGE LÖSCHEN

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Di 19.12.06 00:19 
user profile iconPepp3r hat folgendes geschrieben:

ausblenden Quelltext
1:
form1.image1.Free;					

Button liegt auf Form2 und das image auf form2 :)


ich hab mal genauer hingeschaut
das image liegt wohl doch auf form1?

dann machsu
ausblenden Delphi-Quelltext
1:
Form1.Image1:= TImage.Create(self);					


und damit die unit2 Timages kennt musst du noch
extctrls in die uses einbinden

EDIT:

warum löschst du das bild überhaupt erst wenn dus gleich danach wieder erstellen willst?
Pepp3r Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 82



BeitragVerfasst: Di 19.12.06 09:10 
weil ich eine möglichkeit suche, das image in einer anderen größe erscheinen zu lassen. Also ich gebe in einem spinedit eine zahl ein, und diese wird in pixel auf das image übertragen. Leider funktioniert das nur ordentlich, wenn ich das image recreate.

achso, habe mich oben verschrieben, ich meinte:
Der button liegt auf From2 und das image auf Form1