John117 Posted December 13, 2007 Share Posted December 13, 2007 (edited) Please run the followig script and press and hold the right arrow. When I update this label I get a grey flicker. (I need that to go away) Is this possible or perhaps another way? ;----- example 2 #include <GUIConstants.au3> $gui = GUICreate("test transparentpic", 345, 1) $pic = GUICreate("", 345, 232, 10, 75, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $gui) GUICtrlCreatePic(@SystemDir & "\oobe\images\monitor.gif", 0, 0, 0, 0) Global $Message = GUICtrlCreateLabel("1", 40, 40, 30, 20) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ;GUICtrlSetColor(-1, 0xFFFFF0) ;Changed back to black to prevent white backgrounds from not seeing it. GUISetState(@SW_SHOW, $pic) GUISetState(@SW_SHOW, $gui) HotKeySet("{ESC}", "main") HotKeySet("{RIGHT}", "right") Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE Exit Func main() Exit EndFunc ;==>main Func right() GUICtrlSetData($Message, (GUICtrlRead($Message) + 1)) EndFunc ;==>right Edit: Moved the count onto the computer screen so that it can been seen clearly Edited December 13, 2007 by Hatcheda Link to comment Share on other sites More sharing options...
DW1 Posted December 13, 2007 Share Posted December 13, 2007 Hmm... that seems to be a limitation of the redraw rate... maybe just an autoit thing? AutoIt3 Online Help Link to comment Share on other sites More sharing options...
John117 Posted December 13, 2007 Author Share Posted December 13, 2007 (edited) I saw someting on here that draws, but I can't find it. [A udf I think]check out the refresh rate on this . . .Was wondering if maybe I could draw the messages http://www.autoitscript.com/forum/index.ph...st&p=442804expandcollapse popup#include <GUIConstants.au3> #include <File.au3> #include <GDIPlus.au3> Opt("GUIOnEventMode", 1) Global $Filter = "*.jpg" ; Set this to the format you want to load eg: *.gif or *.png or *.bmp ... etc Global $PicturePath = @WindowsDir & "\Web\Wallpaper" ; Set this to the path you want Global $FL2A = _FileListToArray($PicturePath, $Filter, 1) If @error Then Exit Global $ShowNewPic, $y = 10 $Gui = GUICreate("MY GUI MOVE-PIC", 390, 335) GUISetBkColor (0xE0FFFF) GUISetOnEvent($GUI_EVENT_CLOSE, "Close", $Gui) GUISetState(@SW_SHOW, $Gui) AdlibEnable("RandomPicture", 200) _GDIPlus_Startup() While 1 Sleep(100) MoveGraphicsImage() WEnd Func MoveGraphicsImage() Local $stRegion, $hGraphic, $hImage For $i = -140 To 390 Step 2 $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($Gui) $hImage = _GDIPlus_ImageLoadFromFile($ShowNewPic) _GDIPLus_GraphicsDrawImageRect($hGraphic, $hImage, $i, $y, 140, 105) _GDIPlus_GraphicsDispose ($hGraphic) _GDIPlus_ImageDispose($hImage) $stRegion = DllStructCreate($tagRECT) DllStructSetData($stRegion, 1, $i) DllStructSetData($stRegion, 2, $y) DllStructSetData($stRegion, 3, $i + 2) DllStructSetData($stRegion, 4, $y + 115) _WinAPI_InvalidateRect($Gui, $stRegion, True) Sleep(5) Next If $y < 275 Then $y += 105 If $y >= 275 Then $y = 10 EndFunc Func RandomPicture() $ShowNewPic = $PicturePath & "\" & $FL2A[Random(1, $FL2A[0], 1)] EndFunc Func _GDIPLus_GraphicsDrawImageRect($hGraphics, $hImage, $iX, $iY, $iW, $iH) Local $aResult $aResult = DllCall($ghGDIPDll, "int", "GdipDrawImageRectI", "hwnd", $hGraphics, "hwnd", $hImage, "int", $iX, "int", $iY, "int", $iW, "int", $iH) Return SetError($aResult[0], 0, $aResult[0] = 0) EndFunc ;==>_GDIPlus_GraphicsDrawImage Func Close() _GDIPlus_ShutDown() Exit EndFunc Edited December 13, 2007 by Hatcheda Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now