Habe Post#7 aktualisiert!
Gruß,
UEZ
Habe Post#7 aktualisiert!
Gruß,
UEZ
Hier meine Version:
#include-once
#include <String.au3>
Global $ip = "32.64.0.3"
MsgBox(0, "IP Address to Binary String", "IP = " & @TAB & $ip & @LF & "Binary = " & @TAB & IPv4toBIN($ip))
Global $sBin = "10000001 111000 1010 00001111"
MsgBox(0, "Binary String to IP Address", "Binary = " & @TAB & $sBin & @LF & "IP = " & @TAB & BINtoIPv4($sBin))
;===============================================================================
; Function Name: IPv4toBIN
; Description: Converts an IP v4 string to a binary string format
; Parameter(s): $sIP: the ip v4 address with a format "a.b.c.d"
; $bLen8
; True: output binary string length is always 8 digits
; False: output is truncated to minimum length
; Requirement(s): String.au3
; Return Value(s): binary string format of all octets from the ip address with a format "a b c d"
;Error Codes: 1: ip adress not in appropiate format
; 2: invalid ip token size -> must be between 0 and 255
; Author(s): UEZ
;Version: v0.99 Build 2012-02-28
;===============================================================================
Func IPv4toBIN($sIP, $bLen8 = True)
Local $aIPTokens = StringRegExp($sIP, "(\d+)\.(\d+)\.(\d+)\.(\d+)", 3)
If @error Then Return SetError(1, 0, -1)
Local $bin, $sBin, $i
For $i = 0 To 3
If Int($aIPTokens[$i]) Then
If $aIPTokens[$i] > 255 Then Return SetError(2, 0, -1)
While $aIPTokens[$i] > 0
$bin &= Mod($aIPTokens[$i], 2)
$aIPTokens[$i] = Floor($aIPTokens[$i] / 2)
WEnd
Else
If $bLen8 Then
$bin = "00000000"
Else
$bin = "0"
EndIf
EndIf
If $bLen8 Then
$sBin &= StringFormat("%0.8i", _StringReverse($bin)) & " "
Else
$sBin &= _StringReverse($bin) & " "
EndIf
$bin = ""
Next
Return StringMid($sBin, 1, StringLen($sBin) - 1)
EndFunc
;===============================================================================
; Function Name: BINtoIPv4
; Description: Converts a binary string format to an IP v4 string
; Parameter(s): $sBin: the binary string with format "a b c d"
; Requirement(s): String.au3
; Return Value(s): the ip address in format "a.b.c.d"
;Error Codes: 1: string is not a binary string
; 2: too much tokens
; Author(s): UEZ
;Version: v0.99 Build 2012-02-28
;===============================================================================
Func BINtoIPv4($sBin) ;coded by UEZ 2012
Local $aIPTokens = StringRegExp($sBin, "[01]{1,8}", 3)
If @error Then Return SetError(1, 0, -1)
If UBound($aIPTokens) <> 4 Then Return SetError(2, 0, -1)
Local $sIP, $int, $x, $y, $i = 1, $aTmp
For $y = 0 To 3
$aTmp = StringSplit(_StringReverse($aIPTokens[$y]), "")
For $x = 1 To UBound($aTmp) - 1
$int += $aTmp[$x] * $i
$i *= 2
Next
$sIP &= $int & "."
$int = 0
$i = 1
$aTmp = 0
Next
Return StringMid($sIP, 1, StringLen($sIP) - 1)
EndFunc
Gruß,
UEZ
Meinst du so was?
#include <GuiConstants.au3>
#include <GdiPlus.au3>
OnAutoItExitRegister("_end")
[/autoit] [autoit][/autoit] [autoit]$Gui = GUICreate("Beispiel", 500, 600)
$iLabel = GUICtrlCreateLabel("", 11, 10, 188, 23)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW)
_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$hGraphics = _GDIPlus_GraphicsCreateFromHWND($Gui)
_GDIPlus_GraphicsSetSmoothingMode($hGraphics, 2)
$hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Backgrounds\gui_background5.jpg")
_GDIPlus_GraphicsDrawImage($hGraphics, $hImage, 0, 0)
$hImage2 = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Backgrounds\gui_background_label.jpg")
_GDIPlus_GraphicsDrawImage($hGraphics, $hImage2, 11,10)
_GDIPlus_StringFormatCreate(0x0001,0)
$c = 0
[/autoit] [autoit][/autoit] [autoit]While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
_end()
Exit
EndSwitch
$aMPos = GUIGetCursorInfo($Gui)
If IsArray($aMPos) Then
If $aMPos[4] = $iLabel Then
If $c Then
_GDIPlus_GraphicsDrawImage($hGraphics, $hImage2, 11,10)
_GDIPlus_GraphicsDrawString($hGraphics,"Es wurde 'A' 10 mal gedrückt.", 15,12)
$c = 0
EndIf
Else
If Not $c Then
_GDIPlus_GraphicsDrawImage($hGraphics, $hImage2, 11,10)
$c = 1
EndIf
EndIf
EndIf
WEnd
Func _end()
_GDIPlus_ImageDispose($hImage)
_GDIPlus_ImageDispose($hImage2)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_Shutdown()
EndFunc
Gruß,
UEZ
Warum das Rad neu erfinden?
In der GDIp.au3 ist bereits die Funktion _GDIPlus_GraphicsSetInterpolationMode() implementiert, die beim Scalen eines Bildes 7 verschiedene Interploationsmodis mitbringt.
; #FUNCTION# ====================================================================================================================
; Name...........: _GDIPlus_GraphicsSetInterpolationMode
; Description ...: Sets the interpolation mode of a Graphics object
; Syntax.........: _GDIPlus_GraphicsSetInterpolationMode($hGraphics, $iInterpolationMode)
; Parameters ....: $hGraphics - Pointer to a Graphics object
; $iInterpolationMode - Interpolation mode:
; |0 - Default interpolation mode
; |1 - Low-quality mode
; |2 - High-quality mode
; |3 - Bilinear interpolation. No prefiltering is done
; |4 - Bicubic interpolation. No prefiltering is done
; |5 - Nearest-neighbor interpolation
; |6 - High-quality, bilinear interpolation. Prefiltering is performed to ensure high-quality shrinking
; |7 - High-quality, bicubic interpolation. Prefiltering is performed to ensure high-quality shrinking
; Return values .: Success - True
; Failure - False and either:
; |@error and @extended are set if DllCall failed
; |$GDIP_STATUS contains a non zero value specifying the error code
; Remarks .......: The interpolation mode determines the algorithm that is used when images are scaled or rotated
; Related .......: _GDIPlus_GraphicsGetInterpolationMode
; Link ..........; @@MsdnLink@@ GdipSetInterpolationMode
; Example .......; No
; ===============================================================================================================================
Func _GDIPlus_GraphicsSetInterpolationMode($hGraphics, $iInterpolationMode)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "handle", $hGraphics, "int", $iInterpolationMode)
If @error Then Return SetError(@error, @extended, False)
$GDIP_STATUS = $aResult[0]
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus_GraphicsSetInterpolationMode
Gruß,
UEZ
Sorry, ich verstehe nicht ganz was du machen willst.
Hilft dir das hier weiter?
#include <GUIConstantsEx.au3>
#include <GDIPlus.au3>
_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$Breite = 600
$Hoehe = 400
$y = 110
$TestGUI = GUICreate("Test", $Breite, $Hoehe, 192, 124)
$NeuZeichnen = GUICtrlCreateButton("Neu zeichnen", 424, 48, 75, 25)
GUISetState(@SW_SHOW)
$iRGB = "0xFF" & _WinAPI_GetGUIBkColor($TestGUI)
Global $sFile = StringReplace(@AutoItExe, "autoit3.exe", "Examples\GUI\Torus.png")
$Grafik = _GDIPlus_GraphicsCreateFromHWND($TestGUI)
$Bitmap = _GDIPlus_BitmapCreateFromGraphics($Breite/2, $Hoehe, $Grafik)
$Buffer = _GDIPlus_ImageGetGraphicsContext($Bitmap)
$hHintergrund = _GDIPlus_ImageLoadFromFile($sFile)
_GDIPlus_GraphicsClear($Buffer, $iRGB)
_GDIPlus_GraphicsDrawImage($Buffer, $hHintergrund, 0, 50)
_GDIPlus_GraphicsDrawString($Buffer, "Test1", 70, 110)
_GDIPlus_GraphicsDrawImage($Grafik, $Bitmap, 0, 0)
AdlibRegister("Scroll", 50)
$i = 2
While Sleep(10)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
AdlibUnRegister("Scroll")
_GDIPlus_ImageDispose($hHintergrund)
_GDIPlus_GraphicsDispose($Buffer)
_GDIPlus_BitmapDispose($Bitmap)
_GDIPlus_GraphicsDispose($Grafik)
_GDIPlus_Shutdown()
Exit
Case $NeuZeichnen
$i += 1
EndSwitch
WEnd
Func Scroll()
_GDIPlus_GraphicsClear($Buffer, $iRGB)
_GDIPlus_GraphicsDrawImage($Buffer, $hHintergrund, 0, 50)
_GDIPlus_GraphicsDrawString($Buffer, "Test" & $i, 70, $y)
_GDIPlus_GraphicsDrawImage($Grafik, $Bitmap, 0, 0)
If $y = -10 Then $y = $Hoehe
$y -= 1
EndFunc
Func _WinAPI_GetGUIBkColor($hWnd) ;taken from WinAPIEx.au3
Local $hDC = _WinAPI_GetDC($hWnd)
If Not $hDC Then Return SetError(1, 0, 0)
Local $bgcolor = DllCall("GDI32.dll", "int", "GetBkColor", "hwnd", $hDC)
If @error Or $bgcolor[0] = -1 Then Return SetError(2, 0, 0)
_WinAPI_ReleaseDC($hWnd, $hDC)
$bgcolor = $bgcolor[0] ;BGR
$bgcolor = Hex(BitOR(BitAND($bgcolor, 0x00FF00), BitShift(BitAND($bgcolor, 0x0000FF), -16), BitShift(BitAND($bgcolor, 0xFF0000), 16)), 6) ;convert to RGB
Return $bgcolor ;return RGB
EndFunc
Gruß,
UEZ
Es kommt darauf an, was du genau machen willst! Wenn du "nur" Test1 löschen und Test2 schreiben möchtest, dann mache das lieber mit GUICtrlCreateLabel().
Probiere es mal damit:
#include <GUIConstantsEx.au3>
#include <GDIPlus.au3>
_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$Breite = 600
$Hoehe = 400
$TestGUI = GUICreate("Test", $Breite, $Hoehe, 192, 124)
$NeuZeichnen = GUICtrlCreateButton("Neu zeichnen", 424, 48, 75, 25)
GUISetState(@SW_SHOW)
$iRGB = "0xFF" & _WinAPI_GetGUIBkColor($TestGUI)
$Grafik = _GDIPlus_GraphicsCreateFromHWND($TestGUI)
$Bitmap = _GDIPlus_BitmapCreateFromGraphics($Breite/2, $Hoehe, $Grafik)
$Buffer = _GDIPlus_ImageGetGraphicsContext($Bitmap)
_GDIPlus_GraphicsClear($Buffer, $iRGB)
_GDIPlus_GraphicsDrawString($Buffer, "Test1", 170, 110)
_GDIPlus_GraphicsDrawImage($Grafik, $Bitmap, 0, 0)
$i = 2
[/autoit] [autoit][/autoit] [autoit]While Sleep(10)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_GDIPlus_GraphicsDispose($Buffer)
_GDIPlus_BitmapDispose($Bitmap)
_GDIPlus_GraphicsDispose($Grafik)
_GDIPlus_Shutdown()
Exit
Case $NeuZeichnen
_GDIPlus_GraphicsClear($Buffer, $iRGB)
_GDIPlus_GraphicsDrawString($Buffer, "Test" & $i, 170, 110)
_GDIPlus_GraphicsDrawImage($Grafik, $Bitmap, 0, 0)
$i +=1
EndSwitch
WEnd
Func _WinAPI_GetGUIBkColor($hWnd) ;taken from WinAPIEx.au3
Local $hDC = _WinAPI_GetDC($hWnd)
If Not $hDC Then Return SetError(1, 0, 0)
Local $bgcolor = DllCall("GDI32.dll", "int", "GetBkColor", "hwnd", $hDC)
If @error Or $bgcolor[0] = -1 Then Return SetError(2, 0, 0)
_WinAPI_ReleaseDC($hWnd, $hDC)
$bgcolor = $bgcolor[0] ;BGR
$bgcolor = Hex(BitOR(BitAND($bgcolor, 0x00FF00), BitShift(BitAND($bgcolor, 0x0000FF), -16), BitShift(BitAND($bgcolor, 0xFF0000), 16)), 6) ;convert to RGB
Return $bgcolor ;return RGB
EndFunc
Gruß,
UEZ
Schaue mal hier rein, ob das Performant genug ist: ArrayUnique ohne Bug´s und Schneller
Vergiss es, geht am Thema vorbei!
Sorry,
UEZ
Kurz und elegant gelöst! ![]()
Top!
Gruß,
UEZ
Ich habe noch nie Fasching gemocht und werde es sehr wahrscheinlich auch nie mögen, aber ich liebe den Karnveval in Rio...
http://www.brazilcarnival.com.br/videos ![]()
Gruß,
UEZ
Vielleicht so?
#include <String.au3>
#include <StaticConstants.au3>
Global $startcd = 10
$hGUI = GUICreate("Test", 200, 100)
$idLabel = GUICtrlCreateLabel(".......... "& $startcd & " ..........", 0, 40, 200, 50, $SS_CENTER)
GUICtrlSetFont(-1, 10)
GUISetState()
AdlibRegister("Countdown", 99)
[/autoit] [autoit][/autoit] [autoit]Do
Until GUIGetMsg() = -3
AdlibUnRegister("Countdown")
Exit
Func Countdown()
Local Static $c = 10
If Not $startcd Then AdlibUnRegister("Countdown")
Local $s = _StringRepeat(".", $c)
GUICtrlSetData($idLabel, $s & " " & $startcd & " " & $s)
$c = Mod($c - 1, 10)
If Not $c Then
$c = 10
$startcd -= 1
EndIf
EndFunc
Gruß,
UEZ
Schaue dir doch mal in der Help Datei unter InputBox den 9. Parameter an ![]()
Gruß,
UEZ
Alles anzeigenname22, sieht gut aus
sehr geschmeidig animiert!
und wo ist deine Uhr?
Und bevor du mich fragst, wo meine ist...Spoiler anzeigen
[autoit]#include <GDIPlus.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <Timers.au3>Dim $ws[12] = [0, 0, 10, -7, 50, -7, 60, 0, 50, 7, 10, 7] ;Koordinaten Polygonzug: von links nach rechts WAAGRECHTER Balken, von rechts nach links SENKRECHTER Balken
[/autoit] [autoit][/autoit] [autoit]
Dim $ziffer[10] = [239, 10, 118, 94, 154, 220, 253, 14, 254, 222] ;alle gesetzten bits des Indexes in der 7-segmentanzeige ergeben die Ziffer
Dim $balkenpos[8] = [0, "60.0", "0.0", "60.60", "0.60", "0.60", "0.120", "0.0"] ;position der Leuchtbalken der 7-Segmentanzeige innerhalb der Ziffer
Dim $p[7][2] ;nimmt die polygonzug-koordinaten zum Zeichnen auf
$p[0][0] = 6 ;6 Punkte im PolygonzugGlobal $hgui = GUICreate('Uhr', 620, 175, -1, -1, $WS_POPUP, $WS_EX_CONTROLPARENT) ;GUI erstellen ohne Rahmen
[/autoit] [autoit][/autoit] [autoit]
GUISetBkColor(0x000000) ;Hintergrund der GUI schwarz
WinSetTrans($hgui, "", 205) ;transparenz
GUISetState() ;GUI anzeigen_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]
Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hgui) ;"Leinwand" erstellen, auf der gezeichnet werden kann
;_time()
_Timer_SetTimer($hgui, 1000, "_TIMER_CALLBACK")Do ;Endlosschleife, solange bis..
[/autoit] [autoit][/autoit] [autoit]
Until GUIGetMsg() = -3 ;..ESC gedrückt wird_Timer_KillAllTimers($hgui)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_GraphicsDispose($hGraphic) ;freigeben
_GDIPlus_Shutdown()Func _TIMER_CALLBACK($hWnd, $Msg, $iIDTimer, $dwTime)
[/autoit] [autoit][/autoit] [autoit]
;Uhrzeit anzeigen :o)
For $k = 1 To 6 ;die 6 Ziffern der Uhrzeit
$setbits = $ziffer[StringMid(String(@HOUR & @MIN & @SEC), $k, 1)] ;gesetzte Bits in der siebensegmentanzeige anhand der Ziffer in der Uhrzeit holen
For $bitnr = 7 To 1 Step -1 ;alle Bits durchlaufen
_drawpolygon(BitAND($setbits, 128), $k * 100 - 80 + ($k = 1 Or $k = 3 Or $k = 5) * 20, $bitnr) ;parameter: bit gesetzt ja/nein, position der gesamten ziffer,nummer des bits(gerade=waagrechter balken, ungerade=senkrechter balken)
$setbits = BitShift($setbits, -1) ;nächstes Bit holen
Next
Next
$brush = _GDIPlus_BrushCreateSolid(0xFF440000 + (@SEC / 2 = Int(@SEC / 2)) * 0xBB0000) ;Pinsel erstellen, wenn Ziffer gerade, dann farbig, ansonsten schwarz
_GDIPlus_GraphicsFillEllipse($hGraphic, 202, 55, 15, 15, $brush) ;Punkte zeichnen
_GDIPlus_GraphicsFillEllipse($hGraphic, 402, 55, 15, 15, $brush)
_GDIPlus_GraphicsFillEllipse($hGraphic, 202, 105, 15, 15, $brush)
_GDIPlus_GraphicsFillEllipse($hGraphic, 402, 105, 15, 15, $brush)
_GDIPlus_BrushDispose($brush) ;Pinsel auflösen
EndFunc ;==>_TIMER_CALLBACKFunc _drawpolygon($bit, $xpos, $bitnr) ;zeichnet einen polygonzug ("Balken") an die entsprechende Position
[/autoit] [autoit][/autoit] [autoit][/autoit]
$split = StringSplit($balkenpos[$bitnr], ".", 3) ;x- und y-koordinaten des Balkens innerhalb der Ziffer holen
$b = (($bitnr / 2) = Int($bitnr / 2)) ;$bit gerade => $b = true => Balken waagrecht, ansonsten Balken senkrecht
$step = -1 + 2 * $b ;schrittweite durch das $WS-Array
For $i = 11 - 11 * $b To 11 * $b Step 2 * $step ;array mit waagrechten (bit=gerade) oder (Bit=ungerade) senkrechten Balken füllen
$r = Int(Abs((11 * (Not ($b))) - $i) / 2) + 1 ;abhängig von der Reihenfolge, egal ob $i von 0 bis 11 oder von 11 bis 0, $r muss immer 1,2,3,4,5,6
$p[$r][0] = $ws[$i] + $split[0] + $xpos ;x- und
$p[$r][1] = $ws[$i + $step] + $split[1] + 30 ;y-position in das polygonarray schreiben
Next
$brush = _GDIPlus_BrushCreateSolid(0xFF440000 + ($bit <> 0) * 0xBB0000) ;wenn bit gesetzt, dann farbig, ansonsten schwarz
_GDIPlus_GraphicsFillPolygon($hGraphic, $p, $brush) ;Balken zeichnen
_GDIPlus_BrushDispose($brush)
EndFunc ;==>_drawpolygonsind auch "nur" 50 Zeilen Code...
Sehr effizient gecodet! ![]()
Fehlt "nur" noch eine Zeile, z.B. in Zeile 19:
[autoit]
_GDIPlus_GraphicsSetSmoothingMode($hGraphic, 2)
Dann sieht's richtig "rund" aus, ![]()
Gruß,
UEZ
name22: du kannst den Font auch direkt laden und benutzen, ohne ihn vorher installieren zu müssen!
Finde gerade kein Beispiel...
Gruß,
UEZ
@Marsi: auf meinem Win7 x64 + Aero wird die Uhr in einem schwarzem Rechteck angezeigt, d.h. keine Transparenz.
name22: nette Idee!
Gruß,
UEZ
Probiere es mal damit:
[autoit]
#include <WindowsConstants.au3>
$hGUI = GUICreate("Test", 320, 256, -1, -1, $WS_POPUPWINDOW, $WS_EX_STATICEDGE + $WS_EX_CLIENTEDGE + $WS_EX_DLGMODALFRAME)
[/autoit][autoit][/autoit][autoit]GUISetState()
[/autoit][autoit][/autoit][autoit][/autoit][autoit]Do
Until GUIGetMsg() = -3
Exit
[/autoit]Gruß,
UEZ
Hi Oynama Schickidim Schickidim,
vielleicht kannst du hieraus was gebrauchen: Check Online Status v0.97 Build 2011-11-27 Beta
Gruß,
UEZ
PS: Tarkan lässt Grüßen ![]()
Sowas?
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.8.0
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
#include <GUIConstantsEx.au3>
#include "GUICreateTransparent.au3"
#Include <Misc.au3>
$iGW = 300
$iGH= 200
$hGUI = _GUICreate_Transparent(@ScriptDir & "\UglyBird.png",$iGW,$iGH)
$iW = 321
$iH = 347
$iPosX=124
$iPosY=142
$hChild = GUICreate("Form1", $iW, $iH, $iPosX,$iPosY,$WS_POPUP,$WS_EX_LAYERED+$WS_EX_MDICHILD, $hGUI)
GUISetBkColor(0x000000,$hChild)
GUISetState(@SW_SHOW, $hGUI)
GUISetState(@SW_SHOW, $hChild)
_WinAPI_SetLayeredWindowAttributes($hChild, 0x123456, 0xff)
WinSetOnTop($hChild, "", 0)
$dll = DllOpen("user32.dll")
While 1
_CheckMove()
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
DllClose($dll)
GUIRegisterMsg($WM_LBUTTONDOWN, "")
Exit
EndSwitch
WEnd
Func _CheckMove()
If _IsPressed("01", $dll) Then
sleep(20)
$Pos = MouseGetPos()
WinMove($hGUI,"",$Pos[0]-$iW/2-$iPosX, $Pos[1]-$iH/2-$iPosY) ; + 124 , weil Left von $hGUI 123 weniger ist als bei $hChild, + 142, wegen Top
;~ WinMove($hGUI,"",$Pos[0]-$aPosWin[0],$Pos[1]-$aPosWin[1])
EndIf
EndFunc
Gruß,
UEZ
Probiere es mal damit:
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.8.0
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
#include <GUIConstantsEx.au3>
#include "GUICreateTransparent.au3"
#Include <Misc.au3>
Global Const $SC_DRAGMOVE = 0xF012
$hGUI = _GUICreate_Transparent(@ScriptDir & "\UglyBird.png",300,200)
$hChild = GUICreate("Form1", 321, 347, 124, 142,$WS_POPUP,$WS_EX_LAYERED+$WS_EX_MDICHILD, $hGUI)
GUISetBkColor(0x000000,$hChild)
GUISetState(@SW_SHOW, $hGUI)
GUISetState(@SW_SHOW, $hChild)
_WinAPI_SetLayeredWindowAttributes($hChild, 0x123456, 0xff)
WinSetOnTop($hChild, "", 0)
$dll = DllOpen("user32.dll")
GUIRegisterMsg($WM_LBUTTONDOWN, "_WM_LBUTTONDOWN")
[/autoit] [autoit][/autoit] [autoit]While 1
;~ _CheckMove()
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
DllClose($dll)
GUIRegisterMsg($WM_LBUTTONDOWN, "")
Exit
EndSwitch
WEnd
Func _WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam)
_SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0)
EndFunc ;==>_WM_LBUTTONDOWN
Func _CheckMove()
If _IsPressed("01", $dll) Then
sleep(20)
$Pos = MouseGetPos()
WinMove($hChild,"",$Pos[0] + 124,$Pos[1] + 142) ; + 124 , weil Left von $hGUI 123 weniger ist als bei $hChild, + 142, wegen Top
WinMove($hGUI,"",$Pos[0],$Pos[1])
EndIf
EndFunc
Gruß,
UEZ
Herzlichen Glückwunsch zum Geburtstag!
Gruß,
UEZ
Hey, Alles Gute zum Geburtstag!
Sagt man ab 40 eigentlich noch Geburtstagskind oder schon Jubilar?
lgE
Ich würde sagen Alter Sack ![]()
Danke an alle,
UEZ