Autor Beitrag
JJ
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: Mo 14.11.05 21:23 
Ich benutze eine Funktion die Zugriff auf die für die TRansparenz benötigte dlldatei hat. Unter XP läuft alles grade aber unter 98 gibts probleme...
98 hat zwar auch ne user32.dll aber irgendwie scheint die nicht kompatibel zu sein .... HILFE!

_________________
Hallo!
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mo 14.11.05 21:49 
Wenn Du SetLayeredWindowAttributes meinst: Diese Funktion gibt es erst ab Windows 2000. Die funktioniert unter Win9x nicht.

Weiterhin: Die VCL hat einen Bug in Bezug auf Transparenz:
In TCustomForm.SetLayeredAttributes wird nicht geprüft, ob die Funktion SetLayeredWindowAttributes überhaupt verfügbar ist. Unter Win9x führt daher das aktivieren des Alpha-Blendings zu einer AV!

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
JJ Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: Mo 14.11.05 22:31 
kann ich den fehler irgendwie abfangen?

_________________
Hallo!
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mo 14.11.05 23:02 
In dem Du AlphaBlend in Formularen NIE auf True setzt, sondern dies Source-Seitig machst, mit einer Anweisung etwa so hier:

ausblenden Delphi-Quelltext
1:
AlphaBlend := Assigned(SetLayeredWindowAttributes);					


und Resetten einfach auf False setzen. Gleiches gilt für Nutzung des TransparentColors.

Ein weiterer Fix besteht darin, eine Dummy-Funktion SetLayeredWindowAttributeDummy zu implementieren und diese im Fehlerfalle zuzuweisen:

ausblenden Delphi-Quelltext
1:
2:
If @SetLayeredWindowAttributes = nil Then
    SetLayeredWindowAttributes = @SetLayeredWindowAttributesDummy;


Irgendwo im Projekt-Quelltext bevor Formulare erzeugt werden. Die Vorsichtsmaßnahme von oben kann dann entfallen.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
JJ Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 100

Windows XP 64 bit!
delphi 5
BeitragVerfasst: Di 15.11.05 00:21 
ok das muss ich erstmal alles raffen .... das kann was dauern .... schon mal danke für deine schnelle antwort ...:)

_________________
Hallo!