DrawText und Transparenz vertragen sich nicht!
Verfasst: 03.11.2004 18:40
Hallo,
habe erneut ein Problem, ich habe nen Kleinen Scroller gebastelt, der Funktioniert auch soweit, nur wenn ich Transparentz einschalte flackert alles .... das will ich aber nicht, und die Transparentz ist wichtig ...!
Einfach mal Peobieren auszukomentieren!
Hat jemand ne lösung für mich
Danke
habe erneut ein Problem, ich habe nen Kleinen Scroller gebastelt, der Funktioniert auch soweit, nur wenn ich Transparentz einschalte flackert alles .... das will ich aber nicht, und die Transparentz ist wichtig ...!
Code: Alles auswählen
Enumeration
#Window
EndEnumeration
OpenWindow(#Window,0,0,40,40, #PB_Window_BorderLess | #PB_Window_ScreenCentered,"Lukaso's Example")
Global tfont
tfont = LoadFont(10, "Verdana", 7, #PB_Font_Bold)
Procedure SetWinOpacity (hwnd.l, Opacity.l)
SetWindowLong_(hwnd, #GWL_EXSTYLE, $00080000)
SetLayeredWindowAttributes_(hwnd, 0, Opacity, 2)
EndProcedure
Procedure DrawInfo()
tstring.s = "Lukaso's Example"
tspeed = 30
StartDrawing(WindowOutput())
DrawingMode(1)
DrawingFont(tfont)
FrontColor(0,0,0)
Repeat
For i=40 To 0-TextLength(tstring) Step -1
Locate(i, 21)
DrawText(tstring)
Delay (tspeed)
InvalidateRect_(WindowID(#Window),0,1)
UpdateWindow_(WindowID(#Window))
Next
Delay(tspeed)
For i=0-TextLength(tstring) To 40
Locate(i, 21)
DrawText(tstring)
Delay (tspeed)
InvalidateRect_(WindowID(#Window),0,1)
UpdateWindow_(WindowID(#Window))
Next
Delay(tspeed)
ForEver
StopDrawing()
EndProcedure
SetWinOpacity(WindowID(#Window), 100)
CreateThread(@DrawInfo(), 0)
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindowCode: Alles auswählen
SetWinOpacity(WindowID(#Window), 100)Hat jemand ne lösung für mich
Danke