Autor Beitrag
NTcomputer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

Windows 7 x64
Delphi 2005 PE
BeitragVerfasst: Mi 19.03.08 18:24 
Hallo,
ich suche irgendein Objekt, das man über ein TAnimate legen kann,
und welches einen transparenten Hintergrund hat.
Außerdem soll man in dieses Objekt auch noch einen beliebigen Text einfügen können...
Mit nem Label gehts nicht, da das immer im Hintergrund ist...
Hat jemand von euch ne Idee, was man da nehmen könnte?

Schon mal Danke im Voraus!
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Mi 19.03.08 19:02 
Hi und :welcome: im Delphi-Forum,

Notfalls zeichnest du es einfach mit Canvas drüber :? ...
[k.A.] arbeitet TAnimate mit Canvas? [/k.A.]
Wenn ja nimmst du ein Bitmap und die Draw-Routine des Canvas des TAnimate.
Die Bitmap kannst du ja auf transparent schalten.

mfG,

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: Mi 19.03.08 19:13 
Hallo user profile iconNTcomputer,

es ist leider nicht möglich, ein transparentes Control über ein WinControl zu legen. Falls doch, ICH WILL DAS AUCH! :mrgreen:

user profile iconHidden: TAnimate bietet keinen Canvas. Weder Public noch Protected. Ich denke, die Anzeige wird sogar komplett von Windows geregelt.

Vielleicht wäre es möglich, die Anzeige direkt in das AVI reinzumachen, aber ich denke, du willst dynamischen Text bzw. ein Windows-Standard-AVI anzeigen?

Grüße,
Yogu
NTcomputer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

Windows 7 x64
Delphi 2005 PE
BeitragVerfasst: Mi 19.03.08 19:13 
Bin erst Delphi-Einsteiger... daher...
was ist denn Canvas?
NTcomputer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

Windows 7 x64
Delphi 2005 PE
BeitragVerfasst: Mi 19.03.08 19:17 
Naja, ich will mehrere animierte Buttons in einem Menü einbinden,
ich könnte natürlich für jeden Button eine eigene Animation machen,
aber das ist ein Haufen Arbeit, weil ich dann jedes Einzelbild neu erstellen müsste...
also will ich lieber ein paar mal eine Animation und jedes mal anderen Text drüber.
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Mi 19.03.08 19:39 
user profile iconYogu hat folgendes geschrieben:

user profile iconHidden: TAnimate bietet keinen Canvas. Weder Public noch Protected. Ich denke, die Anzeige wird sogar komplett von Windows geregelt.


Hmm... bliebe noch zu klären, was passiert, wenn man mit dem Canvas der Form versucht, das TAnimate zu übermalen. Wenn das ginge würde ich aber direkt eine Klasse TAnimateWithCanvas ableiten, die im Create das Canvas der aktiven Form merkt und dann die Verschiebung zwischen Left/Top der Form und Left/Top des TAnimate rausrechnet.
Wenn man ein Event OnPaint etc. hätte wäre das auch schön...

TCanvas(unit Graphics) ist die Standard-Zeichenvorrichtung bei visual Forms.

mfG,

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: Mi 19.03.08 20:33 
user profile iconHidden hat folgendes geschrieben:
bliebe noch zu klären, was passiert, wenn man mit dem Canvas der Form versucht, das TAnimate zu übermalen.

Das Form ist hinten, das Animate vorne. Du kannst nicht einen Notitzzettel übermalen, indem du auf den darunterliegenden Schreibtisch kritzelst. Das widerspricht jedem Gesetz.
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Mi 19.03.08 20:46 
user profile iconHidden hat folgendes geschrieben:
bliebe noch zu klären...


Womit das geklärt wäre :(

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
NTcomputer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

Windows 7 x64
Delphi 2005 PE
BeitragVerfasst: Do 20.03.08 07:24 
Ich hab noch was anderes gefunden: TStaticText.
An sich wunderbar, kann man über das Animate schieben und besitzt auch Eigenschaft Transparenz.
Nur dass es eben nicht transparent wird.
Hat jemand von euch eine Ahnung, ob und wie man StaticText einen transparenten Hintergrund verpassen kann?
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Do 20.03.08 09:57 
Hi,

könnte es sein, dass die Transparenz von StaticText bei TAnmate nciht funzt :nixweiss: ? Probiers mal über einer anderen Komponente...

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
NTcomputer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

Windows 7 x64
Delphi 2005 PE
BeitragVerfasst: Do 20.03.08 11:31 
nein, geht auch bei anderen Komponenten nicht...
egal bei welchen...
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: Do 20.03.08 12:54 
user profile iconNTcomputer hat folgendes geschrieben:
Nur dass es eben nicht transparent wird.

TStaticText ist ein WinControl. Und wie ich schon geschrieben habe, können WinControls nicht transparent sein. Ich weiß auch nicht warum, aber Windows unterstützt wohl keine Transparenz.

Warum willst du eigentlich Animates benutzen? Du könntest auch mehrere Bilder nehmen, und immer eins davon anzeigen.
NTcomputer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

Windows 7 x64
Delphi 2005 PE
BeitragVerfasst: Do 20.03.08 19:47 
weil es recht einfach ist, animationen zu erstellen...
immer pictures ein- u. ausblenden ist da ziemlich umständlich.
Werd ich wohl oder übel aber so machen müssen...
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Do 20.03.08 22:53 
Hi,

Wozu brauchst du das denn? :gruebel: Hmm als letztes Mittel nimm den Hint, der wird, glaube ich, auch von Windows erstellt, letztendlich.

Hier mal was nach dem Motto "nimm ein unsichtbares Memo" :D :
Wenn du eine Standardanimation verwendest und es unbedingt sein muss, nicht anders geht, nimmst du halt eine zweite Form, die du ja ganz auf transparent stellen kannst und auf borderstyle bsNone und pack sie drüber...
Das ist dann aber echt unsauber, der user würde es optimalerweise aber garnicht merken :?
Wenn es anders geht, mach es anders!

mfG,

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
NTcomputer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

Windows 7 x64
Delphi 2005 PE
BeitragVerfasst: Fr 21.03.08 11:35 
Ich habs letztendlich mit den Einzelbildern gemacht.
War zwar umständlich, hat aber funktioniert.
danke an alle!