Hallo.
Hab mir ne kleine Dia aus langeweile gecoded.
Sollte eig. ein TGA Viewer werden, hat aber nicht geklappt
Ich hoffe jemand kanns gebrauchen.
MfG. PrideRage
Spoiler anzeigen
#include <GDIPlus.au3>
#include <File.au3>
#include <Misc.au3>
HotKeySet("{ESC}", "_disp")
Global $gui = GUICreate("", @DesktopWidth, @DesktopHeight, -3, -1)
GUISetState(@SW_SHOW)
GUISetCursor(16)
_GDIPlus_Startup()
Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($gui)
Global $hBitmap, $i = 1
_draw()
AdlibRegister("_draw", 10000)
While 1
If _IsPressed("27") Then
$i += 1
_drawnew($i)
ElseIf _IsPressed("25") Then
$i -= 1
_drawnew($i)
EndIf
WEnd
Func _draw()
Dim $Images = _FileListToArray(@MyDocumentsDir & "\Eigene Bilder", "*.jpg")
_GDIPlus_GraphicsClear($hGraphics, 0xFF000000)
$hBitmap = _GDIPlus_BitmapCreateFromFile(@MyDocumentsDir & "\Eigene Bilder\" & $Images[$i])
_GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, -1, -1, @DesktopWidth + 10, @DesktopHeight + 30)
If $i == UBound($Images) Then $i = 1
If $i < 1 Then $i = Random(2, UBound($Images)-1, 1)
$i += 1
EndFunc
Func _drawnew($iPicNum = 1)
Dim $Images2 = _FileListToArray(@MyDocumentsDir & "\Eigene Bilder", "*.jpg")
_GDIPlus_GraphicsClear($hGraphics, 0xFF000000)
$hBitmapNew = _GDIPlus_BitmapCreateFromFile(@MyDocumentsDir & "\Eigene Bilder\" & $Images2[$iPicNum])
_GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmapNew, -1, -1, @DesktopWidth + 10, @DesktopHeight + 30)
EndFunc
Func _disp()
GUISetCursor(2)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_Shutdown()
Exit
EndFunc