Autor Beitrag
SWAT
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Fr 26.01.07 23:02 
tag,
bin blutiger anfänger, hab mir grad n par kapitelchen durchgelesen und ich hab grad mal folgende frage: ich will ein bild ins fenster laden, ich benutz D5 und weiß jetzt auch nicht wirklich was ich für ne anwendung starten soll. ich brauch also den code für D5 zum bild laden und das bild soll gleichzeitig als button fungieren, also wenn man drauf klickt dann sacht der hallo von mir aus =)

hoffe auf eine schnelle antwort, swat
ps: thema ist sicherlich im falschen unterforum gelandet ...
hanibal
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 157

Win xp
d7 eterprise
BeitragVerfasst: Fr 26.01.07 23:06 
du musst ein timage auf dein fenster legen, und unter picture dein bild auswählen.

in image1click schreibst du:
ausblenden Delphi-Quelltext
1:
showmessage('Hallo');					



Maddin
SWAT Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Sa 27.01.07 00:24 
jo gut, wobei das nicht so wirklich das problem ist... die frage ist, welche anwendung ich überhaupt machen soll, zur auswahl habe ich (denke ich mal)
1- VCL- Forumularanwendung (.net)
2- Windows-forms-Anwendung (.net)
3- VCL- Formularanwendung (Win32)

wenn ich 1- nehme, dann kann ich schön einfach das bild im manager rein machen, aber ich habe nicht den "CLICK" - you know? welches müsste ich nehmen?
beim 2- muss ich dann auch per code das bild laden und nicht im manager, sprich ich brauch den code dafür ???

danke :)
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Sa 27.01.07 00:35 
Ob Du nun unter Net oder Win32 das musst Du selber entscheiden.

Win32

ausblenden Delphi-Quelltext
1:
Image1.Picture.LoadFromFile('C:\MyBild.bmp');					

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
SWAT Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Sa 27.01.07 00:45 
ah gute sache, aber ich muss ja jetzt noch erstmal (quasi im nichts) rumklicken bis er dann mal das bild zeigt. denn er machts ja erst wenn ich image1 anklicke. soll aber schon vorher angezeigt werden, ich weiß die lösung ist bestimmt einfach, aber ich bin noch so auf c, ich komm hiermit noch nicht so recht klar ?
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Sa 27.01.07 00:51 
Du kannstdas Bild im Objektinspektor unter Picture laden oder Du setzt den Code ins OnCreate der Form.

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
SWAT Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Sa 27.01.07 00:53 
ah sch... das meintest du ja schon, aber ich habs nicht gesehen *schäme mich*
dann ists geklärt - besten dank ;)