Ok, dann meinst du sowas: Tiny URL Downloader v0.96 Build 2011-01-24
Da sind auch die Control Elemente vorhanden und im Hintergrund läuft eine GDI+ Animation.
Gruß,
UEZ
Ok, dann meinst du sowas: Tiny URL Downloader v0.96 Build 2011-01-24
Da sind auch die Control Elemente vorhanden und im Hintergrund läuft eine GDI+ Animation.
Gruß,
UEZ
Warum hast du Controls, worauf du eine Bitmap legen willst? Ich verstehe nicht ganz, was du erreichen willst. Eigentlicht ist das umgekehrt oder?
Kann aber auch an meinem Alter liegen...
Gruß,
UEZ
Wenn ich dich richtig verstanden habe, willst du ein Rechteck auf ein Bild zeichnen, welches transparent ist:
#include <GDIPlus.au3>
$iX_Clip = 50
$iY_Clip = 50
$iWidth_Clip = 200
$iHeight_Clip = 200
$sPathImage = FileOpenDialog("Bild öffnen", @ScriptDir, "Bilder (*.jpg;*.bmp;*.png)")
If @error Then Exit
_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$hImage = _GDIPlus_ImageLoadFromFile($sPathImage)
$iWidth = _GDIPlus_ImageGetWidth($hImage)
$iHeight = _GDIPlus_ImageGetHeight($hImage)
$hBitmap = _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight) ;Erzeugt eine neue leere Bitmap
$hGraphic = _GDIPlus_ImageGetGraphicsContext($hBitmap)
_GDIPlus_GraphicsSetSmoothingMode($hGraphic, 2)
$hBrush = _GDIPlus_BrushCreateSolid(0x60FFFFFF)
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage, 0, 0, $iWidth, $iHeight)
_GDIPlus_GraphicsFillRect($hGraphic, 0, 0, $iWidth / 2 ,$iHeight / 2, $hBrush)
_GDIPlus_ImageSaveToFile($hBitmap, @ScriptDir & "\Test.jpg")
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_BrushDispose($hBrush)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_Shutdown()
Func _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight, $iStride = 0, $iPixelFormat = 0x0026200A, $pScan0 = 0)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", $iStride, "int", $iPixelFormat, "ptr", $pScan0, "int*", 0)
If @error Then Return SetError(@error, @extended, 0)
$GDIP_STATUS = $aResult[0]
Return $aResult[6]
EndFunc ;==>_GDIPlus_BitmapCreateFromScan0
Wenn nicht, dann habe ich dich nicht richtig verstanden.
Gruß,
UEZ
Alle möglichen Dateien lassen sich einfach in .exe umwandeln, das ist keine leistung!
![]()
Gruß,
UEZ
Ich bin immer noch verblüfft, was in 4kb geht > 4kb Code ![]()
Gruß,
UEZ
.----------------. .----------------. .----------------. .----------------. .----------------.
| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |
| | ____ ____ | || | __ | || | ______ | || | ______ | || | ____ ____ | |
| | |_ || _| | || | / \ | || | |_ __ \ | || | |_ __ \ | || | |_ _||_ _| | |
| | | |__| | | || | / /\ \ | || | | |__) | | || | | |__) | | || | \ \ / / | |
| | | __ | | || | / ____ \ | || | | ___/ | || | | ___/ | || | \ \/ / | |
| | _| | | |_ | || | _/ / \ \_ | || | _| |_ | || | _| |_ | || | _| |_ | |
| | |____||____| | || ||____| |____|| || | |_____| | || | |_____| | || | |______| | |
| | | || | | || | | || | | || | | |
| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' |
'----------------' '----------------' '----------------' '----------------' '----------------'
.-. .
(_) )-. .-. / / /
/ __) `-' ).--. ---/--- /-. .-../ .-. . .-.
/ `. / / / / | ( / ( | ) /
/' ) _.(__. / / _.' | `-'-.. `-'-' (_.'
(_/ `----' ..-._)
Alles anzeigen
Alles Gute und viiieell Gesundheit!
Gruß,
UEZ
Mich würde mal die Laufzeit der Skripte interessieren. Kannst du mal einen Benchmark laufen lassen?
Gruß,
UEZ
Ich habe meinen Code aktualisiert, so dass auch leere Felder dargestellt werden.
Wie viele Einträge werden denn bearbeitet?
Gruß,
UEZ
#include <Array.au3>
#region Test Array
Dim $aObjects[99][3] = [ _
["$ftina","ftireditors2@test.com","Accounting Service"], _
["$mlaaa","big2.creditors@test.com","Accounting Service"], _
["$mlaaag","anlla.agius@test.com","Accounting Service"], _
["$mlaaat","ane.attard@test.com","Accounting Service"], _
["$mlaab","mlat.FTi.Com","Accounting Service"], _
["$mlaaba","alder.barbara@test.com","Accounting Service"], _
["$mlaabo","ane.borg@test.com","Accounting Service"], _
["$mlaacl","ansia.calleja@test.com","Accounting Service"], _
["$mlaacu","Au.Curmi@test.com","Accounting Service"], _
["$mlaade","anette.demanuele@test.com","Accounting Service"], _
["$mlaadu","aair.duncan@test.com","Accounting Service"], _
["$mlaage","aw.gerardi@test.com","Accounting Service"], _
["$mlaagl","an.galea@test.com","Accounting Service"], _
["$mlaamg","Ail.Magro@test.com","Accounting Services"], _
["$mlaamr","ail.mercieca@test.com","Accounting Service"], _
["$mlaan","al.scicluna@test.com","Accounting Service"], _
["$mlaas","al.savona@test.com","Accounting Service"], _
["$mlaasc","aise.scicluna@test.com","Accounting Service"], _
["$mlaasp","Ael.Spiteri@test.com","Accounting Service"], _
["$mlaat","keatkins@test.com","Accounting Service"], _
["$mlaawa","a.watanabe@test.com","Accounting Service"], _
["$mlabc","crors19@test.com","Accounting Service"], _
["$mlabgr","bce.grima@test.com","Accounting Service"], _
["$mlabmi","brdette.micallef@test.com","Accounting Service"], _
["$mlaca","che.psaila@test.com","Accounting Service"], _
["$mlacao","ctina.azzopardi@test.com","Accounting Service"], _
["$mlacat","ctian.attard@test.com","Accounting Service"], _
["$mlacaz","clina.azzopardi@test.com","Accounting Service"], _
["$mlacbe","Ctian.Bezzina@test.com","Accounting Servicece"], _
["$mlacbr","celle.borg@test.com","Accounting Service"], _
["$mlacbu","cc.buhagiar@test.com","Accounting Service"], _
["$mlacc","caciscaldi@test.com","Accounting Service"], _
["$mlaccl","C.Carabott@test.com","Accounting Service"], _
["$mlaccm","ctianne.camilleri@test.com","Accounting Service"], _
["$mlaccs","C.Cassar@test.com","Accounting Service"], _
["$mlacdi","con.dingli-bennetti@meetingpointint.com","GD Life Limited"], _
["$mlacfe","ctine.fenech@meetingpointmalta.com","Services Malta Ltd."], _
["$mlacga","lhools1.accounts@test.com","Accounting Service"], _
["$mlachi","ctian.hili@test.com","Accounting Service"], _
["$mlacma","c.micallef@test.com","Accounting Service"], _
["$mlacmz","ctianne.mizzi@test.com","Accounting Service"], _
["$mlacpo","crine.portelli@test.com","Accounting Service"], _
["$mlacq","crors24@test.com","Accounting Service"], _
["$mlacsa","crine.saliba@test.com","Accounting Service"], _
["$mlacsl","csaliba@test.com","Accounting Service"], _
["$mlacvl","Cene.Vella@test.com","Accounting Service"], _
["$mlacxe","cene.xuereb@test.com","Accounting Service"], _
["$mlacxu","ctian.xuereb@test.com","Accounting Service"], _
["$mlada","icest.com","Accounting Service"], _
["$mladb","da.bugeja@test.com","Accounting Service"], _
["$mladba","dn.barbara@test.com","Accounting Service"], _
["$mladc","doy.camilleri@test.com","Accounting Service"], _
["$mladca","dra.catania@test.com","Accounting Service"], _
["$mladd","da.delia@test.com","Accounting Service"], _
["$mlade","bia3.creditors@test.com","Accounting Service"], _
["$mladga","de.galea@test.com","Accounting Service"], _
["$mladgi","dnne.grima@test.com","Accounting Service"], _
["$mladmi","de.mifsud@test.com","Accounting Service"], _
["$mladmu","D.Muscat@test.com","Accounting Service"], _
["$mladp","done.spiteri@test.com","Accounting Service"], _
["$mlaea","crors18@test.com","Accounting Service"], _
["$mlaeca","e.carabott@test.com","Accounting Service"], _
["$mlaemi","eora.micallef@test.com","Accounting Service"], _
["$mlaena","e.nappa@test.com","Accounting Service"], _
["$mlaesp","eel.spiteri@test.com","Accounting Service"], _
["$mlaet","trort@meetingpointmalta.com","Services Malta Ltd."], _
["$mlaev","el.vella@test.com","Accounting Service"], _
["$mlafbu","Fzia.Buhagiar@test.com","Accounting Service"], _
["$mlafm","maka.frantz@test.com","Accounting Service"], _
["$mlagcr","Gelle.Curmi@test.com","Accounting Service"], _
["$mlagg","gleorge.grima@test.com","Accounting Service"], _
["$mlaggo","ga.gouder@test.com","Accounting Service"], _
["$mlagm","ftcreditors@test.com","Accounting Service"], _
["$mlagve","getta.vella@test.com","Accounting Service"], _
["$mlagvl","Gella.Vella@test.com","Accounting Service"], _
["$mlagza","gio.zammit@test.com","Accounting Service"], _
["$mlahfa","hh.farrugia@test.com","Accounting Service"], _
["$mlaig","mlMt.FTi.Com","Accounting Service"], _
["$mlaim","chr4.creditors@test.com","Accounting Service"], _
["$mlajaq","jtte.aquilina@test.com","Accounting Service"], _
["$mlajaz","ctors22@test.com","Accounting Service"], _
["$mlajba","jca.bajada@test.com","Accounting Service"], _
["$mlajbo","j.bonnici@test.com","Accounting Service"], _
["$mlajca","jh.carabott@test.com","Services Malta Ltd."], _
["$mlajcc","j.cauchi@test.com","Accounting Service"], _
["$mlajco","Jne.Cortis@test.com","Accounting Service"], _
["$mlajcr","jfer.caruana@test.com","Accounting Service"], _
["$mlajd","bia5.creditors@test.com","Accounting Service"], _
["$mlajga","j.gatt@test.com","Accounting Service"], _
["$mlajl","jete.galea@test.com","Accounting Service"], _
["$mlajm","jaline.thorpe@test.com","Accounting Service"], _
["$mlajme","jeline.mercieca@test.com","Accounting Service"], _
["$mlajq","jabriffa@test.com","Accounting Service"], _
["$mlajs","mlMt.FTi.Com","Accounting Service"], _
["$mlajto","j.torpiano@test.com","Accounting Service"], _
["$mlajve","jca.vella@test.com","Accounting Services"], _
["$mlajza","ctors14@test.com","Accounting Service"], _
["$mlaka","yimeetingpointmalta.com","Meeting Point Malta Ltd."], _
["$mlakaz","kazzopardi@test.com","Accounting Service"]]
#endregion
$bench = TimerInit()
$aR = CountItems($aObjects)
ConsoleWrite(Round(TimerDiff($bench) / 1000, 4) & " s" & @CRLF)
_ArrayDisplay($aR)
Func CountItems($Array, $item = 2, $ignoreblank = False)
If Not IsArray($Array) Then Return SetError(1, 0, 0)
If $item > UBound($Array, 2) - 1 Then Return SetError(2, 0, 0)
Local $aSource = $Array
_ArraySort($aSource, 0, 0, 0, $item)
Local $aResult[UBound($aSource)][2]
Local $x = 1
Local $i = 0
Local $j = 1
Local $z = 1
While $j < UBound($aSource)
If $aSource[$i][$item] <> $aSource[$j][$item] Then
If $ignoreblank Then
If $aSource[$i][$item] <> "" Then
$aResult[$x][0] = $aSource[$i][$item]
$aResult[$x][1] = $z
$x += 1
EndIf
Else
$aResult[$x][0] = $aSource[$i][$item]
$aResult[$x][1] = $z
$x += 1
EndIf
$i = $j
$z = 0
EndIf
$z += 1
$j += 1
WEnd
If $i = UBound($aSource) -1 Then
$aResult[$x][0] = $aSource[UBound($aSource) - 1][$item]
$aResult[$x][1] = 1
EndIf
If $i < UBound($aSource) -1 And $i > 1 Then
$aResult[$x][0] = $aSource[$i][$item]
$aResult[$x][1] = $z
EndIf
ReDim $aResult[$x + 1][2]
$aResult[0][0] = $x
_ArraySort($aResult, 0, 1, 0, 0)
$aSource = ""
Return SetError(0, 0, $aResult)
EndFunc
Gruß,
UEZ
Wann ist ein Beitrag alt, so dass nicht mehr Kommentare abgegeben werden dürfen/sollten?
Ich finde jeder sollte die Freiheit haben auch "alte" Beiträge zu kommentieren! Genau so gut kann jeder den Beitrag ignorieren!
Ferner finde ich auch den Hinweis unnütz, dass der Thread "alt" ist, schließlich kann man das Einstelldatum selbst sehen!
Gruß,
UEZ
genau so wollte ich es haben! ![]()
Ich will ein Tool basteln, womit man Shares von einem Server zu einem anderen Server umziehen kann (Migration)!
Vielen, vielen DANK Oscar!
Ich komme der Sache jetzt wesentlich näher! ![]()
Ich werde diesen Beitrag zunächst offen lassen, falls ich noch Fragen habe!
Gruß,
UEZ
Hier meine Variante:
Siehe Beitrag #16 unten!
Gruß,
UEZ
VIELEN DANK OSCAR! ![]()
Jetzt muss ich nur noch den Code verstehen und einige kleine Änderungen vornehmen, z.B. soll nicht das gesamte Array rechts im ListView dargestellt werden, sondern nur den Inhalt des jeweiligen Knotens.
Gruß,
UEZ
Hi,
da ich mich noch nie mit Treeview beschäftigt habe, weiß ich momentan nicht, wie ich am besten die Daten in einem Treeview darstellen kann!
#include <Array.au3>
#include <GUIConstantsEx.au3>
#include <GuiTreeView.au3>
#include <ListViewConstants.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>
$data = "SIC2|E:\AU3\SIC2|0|True||OK|Everyone|Full Access" & @LF & _
"AU3$|E:\AU3|0|10|Coding Share|OK|Everyone|Full Access" & @LF & _
"Output|E:\AU3\SIC2\Output|0|True||OK|Everyone|Full Access" & @LF & _
"SDOC|E:\SDOC|0|True|Test Share|OK|Administrators|Full Access" & @LF & _
"SDOC|E:\SDOC|0|True|Test Share|OK|Everyone|Change Access" & @LF & _
"HPBin|E:\Hewlett-Packard\ESS Sizers\Profile Manager\Bin|0|True||OK|Everyone|Read Access" & @LF & _
"wmpub|C:\wmpub|0|True||OK|Administrators|Full Access" & @LF & _
"wmpub|C:\wmpub|0|True||OK|Everyone|Read Access" & @LF & _
"wmpub|C:\wmpub|0|True||OK|Users|Change Access" & @LF & _
"wmiislog|C:\wmpub\wmiislog|0|True||OK|Everyone|Full Access" & @LF & _
"AutoIt3$|C:\Program Files\AutoIt3|0|True||OK|Guest|Full Access Denied" & @LF & _
"AutoIt3$|C:\Program Files\AutoIt3|0|True||OK|Administrators|Full Access" & @LF & _
"AutoIt3$|C:\Program Files\AutoIt3|0|True||OK|Everyone|Read Access" & @LF & _
"AutoIt3$|C:\Program Files\AutoIt3|0|True||OK|Power Users|Change Access"
$aData = Create2DArray($data)
[/autoit] [autoit][/autoit] [autoit]$hGUI = GUICreate("Test", 800, 600)
$hTreeview = GUICtrlCreateTreeView(8, 144, 257, 362, BitOR($GUI_SS_DEFAULT_TREEVIEW,$TVS_EDITLABELS,$TVS_CHECKBOXES,$TVS_SINGLEEXPAND,$WS_BORDER))
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$hListview = GUICtrlCreateListView("Share|Path|Type|Max. Allowed|Description|Status|Account|Permission", 272, 144, 522, 362, BitOR($GUI_SS_DEFAULT_LISTVIEW,$LVS_AUTOARRANGE), BitOR($WS_EX_CLIENTEDGE,$LVS_EX_GRIDLINES))
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUISetState(@SW_SHOW)
$hImage = _GUIImageList_Create(16, 16, 5, 3)
_GUIImageList_AddIcon($hImage, "shell32.dll", 85)
_GUICtrlTreeView_SetNormalImageList($hTreeview, $hImage)
_GUICtrlTreeView_BeginUpdate($hTreeview)
$root = _GUICtrlTreeView_Add($hTreeview, 1, "Shares on TEST_System", 0, 0)
_GUICtrlTreeView_AddChild($hTreeview, $root, "C:\Program Files\AutoIt3", 0, 0)
$hTVItem = _GUICtrlTreeView_AddChild($hTreeview, $root, "C:\wmpub", 0, 0)
$hTVItem = _GUICtrlTreeView_AddChild($hTreeview, $hTVItem, "wmiislog", 0, 0)
$hTVItem = _GUICtrlTreeView_AddChild($hTreeview, $root, "E:\AU3", 0, 0)
$hTVItem2 = _GUICtrlTreeView_AddChild($hTreeview, $hTVItem, "SIC2", 0, 0)
$hTVItem2 = _GUICtrlTreeView_AddChild($hTreeview, $hTVItem2, "Output", 0, 0)
$hTVItem = _GUICtrlTreeView_AddChild($hTreeview, $root, "E:\Hewlett-Packard\ESS Sizers\Profile Manager\Bin", 0, 0)
$hTVItem = _GUICtrlTreeView_AddChild($hTreeview, $root, "E:\SDOC", 0, 0)
_GUICtrlTreeView_EndUpdate($hTreeview)
_GUICtrlTreeView_Expand($hTreeview)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUIDelete($hGUI)
Exit
EndSwitch
WEnd
Func Create2DArray($string, $delimiter = "|")
If $string = "" Then Return SetError(1, 0, 0)
Local $aTemp = StringRegExp($string, "(.*\" & $delimiter & ".*)", 3), $aTmp, $i, $j
Local $2DArray[UBound($aTemp)][8]
For $i = 0 To UBound($aTemp) - 1
$aTmp = StringSplit($aTemp[$i], $delimiter)
For $j = 1 to $aTmp[0]
$2DArray[$i][$j - 1] = $aTmp[$j]
Next
Next
_ArraySort($2DArray, 0, 0, 0, 1)
Return SetError(0, 0, $2DArray)
EndFunc
Das Skript erzeugt die Ansicht, wie ich es haben will (manuell erstellt). Wie kann ich den Baum allgemein nach dem Beispiel erstellen? Der Knoten nur auf Level1 (unter Shares on TEST_System) soll editierbar sein!
Vielen DANK schon mal im voraus!
Gruß,
UEZ
Ich habe deine Funktion (rek.) gegen meine laufen lassen - da sind ja Welten dazwischen!
0,8 Sekunden (deine Funktion)
7,4 Sekunden (meine Funktion)
-=> Faktor 9,25!
Krass!
Well done AspirinJunkie! ![]()
Gruß,
UEZ
Ob die iterative oder rekursive Variante, ist reine Geschmacksache, aber mir gefällt die Idee mit den Objekten!
Gruß,
UEZ
Super Arbeit KaFu! ![]()
Da steckt viel Arbeit drinnen und sonst auch schönes Look & Feel.
Zitat
... ich hatte schon eine Einladung ins internationale Forum gestellt, aber aufgrund der dortigen mangelnden Resonanz platziere ich einfach hier noch eine weitere...
Das mit dem Feedback ist immer so eine Sache. Wenn du Glück hast und zur richtigen Zeit dein Tool postest, kann es sein, dass du auch Feedback bekommst.
Die Erfahrung zeigt, dass es nicht an den Programmiertechniken hängt, sondern eher daran, wie interessant das Programm ist. Was nützen die besten Programmiertechniken, wenn das Interesse gering ist?
Nichtsdestotrotz freue ich mich schon den Code zu sehen! Da kann man sich bestimmt eine Menge Sachen anschauen und lernen!
Gruß,
UEZ
Ok.
Kannst du mir erklären, warum das so ist?Und liege ich richtig in der Annahme, dass ich für $vChildGUIColor einfach nur die Hintergrundfarbe für die HauptGUI + 1 nehmen muss?
Die Farben müssen sich unterscheiden und Hauptfarbe + 1 ist eben am nächsten und macht die Schrift lesbar.
Genauso gut könntest du auch -1 nehmen.
Gruß,
UEZ
Setze mal $vChildGUIColor = 0xDDDDDE. Dann ist auch die Schrift lesbar und die Liste ist auch anklickbar.
Gruß,
UEZ
Hier noch eine andere Variante:
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <ListViewConstants.au3>
#Include <WinAPIEx.au3>
#include <WindowsConstants.au3>
Global $hGraphic, $hBitmap, $hBackbuffer, $hImage, $hTexture, $hBMP
Global Const $STM_SETIMAGE = 0x0172, $vGUIWidth = 400, $vGUIHeight = 400
#region GDI+
_GDIPlus_Startup()
$hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\test.jpg")
$iW = _GDIPlus_ImageGetWidth($hImage)
$iH = _GDIPlus_ImageGetHeight($hImage)
$hGraphic= _GDIPlus_GraphicsCreateFromHWND(WinGetHandle(AutoItWinGetTitle()))
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($vGUIWidth, $vGUIHeight, $hGraphic)
$hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap)
$hTexture = _GDIPlus_TextureCreate($hImage)
_GDIPlus_GraphicsFillRect($hContext , 0, 0, $vGUIWidth, $vGUIHeight, $hTexture)
$hBmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
#endregion
Global $hGUI = GUICreate("", $vGUIWidth, $vGUIHeight)
GUISetBkColor(0x000000, $hGUI)
Global $Pic = GUICtrlCreatePic("", 0, 0)
GUICtrlSendMsg($Pic, $STM_SETIMAGE, 0, $hBmp)
GUICtrlSetState(-1, $GUI_DISABLE)
Global $b = GUICtrlCreateButton("Exit", 10, $vGUIHeight - 50)
[/autoit] [autoit][/autoit] [autoit]Global $lv = GUICtrlCreateListView("SPALTE1|SPALTE2", 10, 10, 200, 200, $LVS_NOCOLUMNHEADER)
GUICtrlSetBkColor(-1, 0xE0E0F0)
GUICtrlSetColor(-1, 0x002000)
_GuiCtrlMakeTrans(-1, 0xE0)
_SetXPStyle(0)
Global $g = GUICtrlCreateGroup("Gruppe1", 220, 10, 160, 150)
GUICtrlSetColor(-1, 0x000040)
GUICtrlSetBkColor(-1, -2);...
_SetXPStyle(1)
GUISetState()
[/autoit] [autoit][/autoit] [autoit]For $i = 0 To 50
_GUICtrlListView_AddItem($lv, Random(0x111111, 0xFFFFFF, 1))
Next
Do
Until GUIGetMsg() = -3
_GDIPlus_GraphicsDispose($hContext)
_GDIPlus_BrushDispose($hTexture)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()
GUIDelete($hGUI)
Exit
Func _SetXPStyle($b_Set = 1); 0 = deactivate, 1 = activate
DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $b_Set * 7)
EndFunc
Func _GDIPlus_TextureCreate($hImage, $iWrapMode = 0)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateTexture", "hwnd", $hImage, "int", $iWrapMode, "int*", 0)
If @error Then Return SetError(@error, @extended, 0)
Return $aResult[3]
EndFunc ;==>_GDIPlus_TextureCreate
Func _GuiCtrlMakeTrans($iCtrlID, $iTrans=255)
Local $pHwnd, $nHwnd, $aPos, $a
$hWnd = GUICtrlGetHandle($iCtrlID);Get the control handle
If $hWnd = 0 then Return SetError(1,1,0)
$pHwnd = DllCall("User32.dll", "hwnd", "GetParent", "hwnd", $hWnd);Get the parent Gui Handle
If $pHwnd[0] = 0 then Return SetError(1,2,0)
$aPos = ControlGetPos($pHwnd[0],"",$hWnd);Get the current pos of the control
If @error then Return SetError(1,3,0)
$nHwnd = GUICreate("", $aPos[2], $aPos[3], $aPos[0], $aPos[1], 0x80000000, 0x00080000 + 0x00000040, $pHwnd[0]);greate a gui in the position of the control
If $nHwnd = 0 then Return SetError(1,4,0)
$a = DllCall("User32.dll", "hwnd", "SetParent", "hwnd", $hWnd, "hwnd", $nHwnd);change the parent of the control to the new gui
If $a[0] = 0 then Return SetError(1,5,0)
If NOT ControlMove($nHwnd,'',$hWnd,0,0) then Return SetError(1,6,-1);Move the control to 0,0 of the newly created child gui
GUISetState(@SW_Show,$nHwnd);show the new child gui
WinSetTrans($nHwnd,"",$iTrans);set the transparency
If @error then Return SetError(1,7,0)
GUISwitch($pHwnd[0]);switch back to the parent Gui
Return $nHwnd;Return the handle for the new Child gui
EndFunc
Gruß,
UEZ