1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. funkey

Beiträge von funkey

  • Array hilfe gesucht

    • funkey
    • 9. Februar 2009 um 11:03

    Hätte es so gemacht:

    Spoiler anzeigen
    [autoit]

    #include <File.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $file = @ScriptDir&"\AP-Messung.txt"

    [/autoit] [autoit][/autoit] [autoit]

    Global $aAP[5][2] = [["192.168.26.10", "Standort1"], _
    ["192.168.26.11", "Standort2"], _
    ["192.168.26.12", "Standort3"], _
    ["192.168.26.13", "Standort4"], _
    ["192.168.26.14", "Standort5"]]

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 0 To UBound($aAP, 1) -1
    If Not Ping($aAP[$i][0], 100) Then _FileWriteLog($file, $aAP[$i][0] &" ("&$aAP[$i][1] &") ist nicht erreichbar!")
    Next

    [/autoit]
  • Fenster Minimieren

    • funkey
    • 9. Februar 2009 um 10:54

    ?

    [autoit]

    GUISetState(@SW_MINIMIZE)

    [/autoit]
  • Fenster Minimieren

    • funkey
    • 9. Februar 2009 um 10:35

    Welches Fenster? Eigene Gui? TrayIcon bleibt doch normalerweise immer da!?

  • Frame in GUI

    • funkey
    • 9. Februar 2009 um 10:12

    Probiers mal so wie hier:
    [ offen ] Einzelne Stücke einer Webseite in einer GUI anzeigen

  • IE als TryIcon

    • funkey
    • 9. Februar 2009 um 09:53

    Benutze auch IE7 und es funktioniert einwandfrei:
    Hab es nur in eine lesbare Form gebracht

    [autoit]


    #include <Constants.au3>
    Opt("WinTitleMatchMode", 2)
    Opt("TrayOnEventMode", 1)
    Opt("TrayMenuMode", 1)

    [/autoit][autoit][/autoit][autoit]

    TraySetOnEvent($TRAY_EVENT_PRIMARYDOWN, "_switch")
    Do
    Sleep(500)
    Until WinExists(" - Windows Internet Explorer")

    [/autoit][autoit][/autoit][autoit]

    WinSetState(" - Windows Internet Explorer", "", @SW_HIDE)
    $state = 0

    [/autoit][autoit][/autoit][autoit]

    While 1
    Sleep(100)
    If Not ProcessExists("iexplore.exe") Then Exit ;Wenn der IE geschlossen wird, Script schließen
    WEnd

    [/autoit][autoit][/autoit][autoit]

    Func _switch()
    If $state = 1 Then
    WinSetState(" - Windows Internet Explorer", "", @SW_HIDE)
    $state = 0
    ElseIf $state = 0 Then
    WinSetState(" - Windows Internet Explorer", "", @SW_SHOW)
    $state = 1
    EndIf
    EndFunc ;==>_switch

    [/autoit]
  • Icon Menü

    • funkey
    • 9. Februar 2009 um 09:29

    Ein Blick zu den Tray-Befehlen in der Hilfe hätte genügt :!: : TraySetIcon

  • Icon Menü

    • funkey
    • 9. Februar 2009 um 09:07

    Ja, sicher ;) ! Schau dir das Hilfe-Beispiel von TrayCreateMenu an.

  • GUI für Shutdown

    • funkey
    • 8. Februar 2009 um 20:15

    Hab dein Beispiel jetzt gar nicht angeschaut. Ich mach es immer einfach und zweckmäßig
    Das von mir verwendete Skript:

    [autoit]

    $Minuten = InputBox("Wie lange noch?","In wievielen Minuten soll der PC heruntergefahren werden?",1)
    If @error = 1 Then Exit
    Sleep(1000 * 60 *$Minuten)
    Shutdown(9)

    [/autoit]
  • Gui-Styling ohne Bilder (Farbübergänge)

    • funkey
    • 8. Februar 2009 um 11:04

    Das ist doch eben auch für Anfänger eine leichte Sache solche Farbübergänge in die eingene Gui einzubauen. Deshalb habe ich ja diese Funktion geschrieben!

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Color.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt("GUIOnEventMode", 1)
    $titel = "Funkey's Style-Test"
    $Form1 = GUICreate($titel, 400, 600, -1, -1, $WS_POPUP)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
    GUISetBkColor(0x00ADDC)

    [/autoit] [autoit][/autoit] [autoit]

    _GuiRoundCorners($Form1, 0, 0, 150, 150)

    [/autoit] [autoit][/autoit] [autoit]

    $Min_Label = GUICtrlCreateLabel("-", 305, 5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
    GUICtrlSetFont(-1, 24, 0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetBkColor(-1, 0xFFAAAA)
    GUICtrlSetTip(-1, 'Minimieren')
    GUICtrlSetOnEvent(-1, '_Minimize')

    [/autoit] [autoit][/autoit] [autoit]

    $Close_Label = GUICtrlCreateLabel("×", 328, 5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
    GUICtrlSetFont(-1, 14, 0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetBkColor(-1, 0xFFAAAA)
    GUICtrlSetTip(-1, 'Schließen')
    GUICtrlSetOnEvent(-1, '_Exit')

    [/autoit] [autoit][/autoit] [autoit]

    $Titel_Label = GUICtrlCreateLabel($titel, 0, 0, 400, 30, 0x4000201, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetFont(-1, 12, 1000)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetColor(-1, 0xffffff)

    [/autoit] [autoit][/autoit] [autoit]

    _CreateColorTransition(0, 0, 400, 30, 0x00FF00, 0x0000FF, 1)
    _CreateColorTransition(0, 550, 400, 50, 0x00ADDC, 0xabcdef)
    _CreateColorTransition(0, 0, 100, 600, 0x002CFA, 0x00ADDC, 1)
    _CreateColorTransition(300, 0, 100, 600, 0x00ADDC, 0xFF2CFA, 1)

    [/autoit] [autoit][/autoit] [autoit]

    $Button1 = _GuiCreateRoundButton($Form1, 170, 100, 60, 150, '_Button', 0x202020, '', -1, @DocumentsCommonDir & '\Eigene Bilder\Beispielbilder\Winter.jpg')
    $Button2 = _GuiCreateRoundButton($Form1, 120, 300, 160, 50, '_Button', 0xFFFF00, 'Testbutton', 20)
    $Button3 = _GuiCreateRoundButton($Form1, 150, 400, 100, 100, '_Button', 0x00FF00, 'bla', -1, @DocumentsCommonDir & '\Eigene Bilder\Beispielbilder\Sonnenuntergang.jpg')

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW, $Form1)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(10000)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _Button()
    Switch @GUI_WinHandle
    Case $Button1
    MsgBox(0, "Runder Button", "Button 1 wurde gedrückt")
    Case $Button2
    MsgBox(0, "Runder Button", "Button 2 wurde gedrückt")
    Case $Button3
    MsgBox(0, "Runder Button", "Button 3 wurde gedrückt")
    EndSwitch
    EndFunc ;==>_Button

    [/autoit] [autoit][/autoit] [autoit]

    Func _Minimize()
    Sleep(100)
    GUISetState(@SW_MINIMIZE)
    EndFunc ;==>_Minimize

    [/autoit] [autoit][/autoit] [autoit]

    Func _GuiCreateRoundButton($hWndParent, $iPosx, $iPosy, $iWidth, $iHeight, $sFunc, $iColor = -1, $sText = "", $iTextSize = -1, $sFileBg = "")
    Local $ret, $ret2, $nExStyle, $Button
    If $iColor = -1 Then $iColor = 0xD4D0C8
    If $iTextSize = -1 Then $iTextSize = 10
    $Button = GUICreate("", $iWidth, $iHeight, $iPosx, $iPosy, $WS_CHILD, -1, $hWndParent)
    GUISetOnEvent($GUI_EVENT_PRIMARYUP, $sFunc)
    GUISetCursor(0, 1, $Button)
    GUISetBkColor($iColor, $Button)
    If $sFileBg <> "" Then GUICtrlCreatePic($sFileBg, 0, 0, $iWidth, $iHeight, 0, 0x00000020)
    If $sText <> "" And $sText <> -1 Then
    GUICtrlCreateLabel($sText, 0, 0, $iWidth, $iHeight, 0x0201, 0x00000008)
    GUICtrlSetFont(-1, $iTextSize, 1000)
    GUICtrlSetState(-1, $GUI_DISABLE)
    EndIf
    $ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', 0, 'long', 0, 'long', $iWidth, 'long', $iHeight, 'long', $iHeight, 'long', $iWidth)
    If $ret[0] Then
    $ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $Button, 'long', $ret[0], 'int', 1)
    If $ret2[0] Then
    GUISetState()
    Return $Button
    Else
    Return SetError(1, 0, 0)
    EndIf
    Else
    Return SetError(2, 0, 0)
    EndIf
    EndFunc ;==>_GuiCreateRoundButton

    [/autoit] [autoit][/autoit] [autoit]

    Func _GuiRoundCorners($hWnd, $x1, $y1, $x3, $y3)
    Local $pos, $ret, $ret2
    $pos = WinGetPos($hWnd)
    $ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', $x1, 'long', $y1, 'long', $pos[2], 'long', $pos[3], 'long', $x3, 'long', $y3)
    If $ret[0] Then
    $ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $hWnd, 'long', $ret[0], 'int', 1)
    If $ret2[0] Then
    Return 1
    Else
    Return 0
    EndIf
    Else
    Return 0
    EndIf
    EndFunc ;==>_GuiRoundCorners

    [/autoit] [autoit][/autoit] [autoit]

    Func _CreateColorTransition($iPosx, $iPosy, $iWidth, $iHeight, $nColorStart, $nColorEnd, $iAlignment = 0)
    Local $startRot, $startGruen, $startBlau, $endRot, $endGruen, $endBlau, $Color
    Local $ColorOffsetRot, $ColorOffsetGruen, $ColorOffsetBlau
    $startRot = _ColorGetRed($nColorStart)
    $startGruen = _ColorGetGreen($nColorStart)
    $startBlau = _ColorGetBlue($nColorStart)
    $endRot = _ColorGetRed($nColorEnd)
    $endGruen = _ColorGetGreen($nColorEnd)
    $endBlau = _ColorGetBlue($nColorEnd)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlCreateGraphic($iPosx, $iPosy, $iWidth, $iHeight, 0)
    GUICtrlSetState(-1, $GUI_DISABLE)

    Switch $iAlignment
    Case 0
    $ColorOffsetRot = ($endRot - $startRot) / $iHeight
    $ColorOffsetGruen = ($endGruen - $startGruen) / $iHeight
    $ColorOffsetBlau = ($endBlau - $startBlau) / $iHeight
    For $i = 0 To $iHeight - 1
    $Color = '0x' & Hex($startRot + $ColorOffsetRot * ($i + 1), 2) & Hex($startGruen + $ColorOffsetGruen * ($i + 1), 2) & Hex($startBlau + $ColorOffsetBlau * ($i + 1), 2)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
    GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, $iWidth, $i)
    Next
    Case Else
    $ColorOffsetRot = ($endRot - $startRot) / $iWidth
    $ColorOffsetGruen = ($endGruen - $startGruen) / $iWidth
    $ColorOffsetBlau = ($endBlau - $startBlau) / $iWidth
    For $i = 0 To $iWidth - 1
    $Color = '0x' & Hex($startRot + $ColorOffsetRot * ($i + 1), 2) & Hex($startGruen + $ColorOffsetGruen * ($i + 1), 2) & Hex($startBlau + $ColorOffsetBlau * ($i + 1), 2)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
    GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $i, 0)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, $i, $iHeight)
    Next
    EndSwitch
    EndFunc ;==>_CreateColorTransition

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    Sleep(100)
    Exit
    EndFunc ;==>_Exit

    [/autoit]
  • Gui-Styling ohne Bilder (Farbübergänge)

    • funkey
    • 7. Februar 2009 um 23:24

    Es sieht ja ziemlich gleich aus, aber so hat man viel mehr Möglichkeiten offen! ;)
    Siehe hier:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Include <Color.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt("GUIOnEventMode",1)
    $titel = "Funkey's Style-Test"
    $Form1 = GUICreate($titel, 400, 600, -1, -1, $WS_POPUP)
    GUISetOnEvent($GUI_EVENT_CLOSE,"_Exit")
    GUISetBkColor(0x00ADDC)

    [/autoit] [autoit][/autoit] [autoit]

    _GuiRoundCorners($Form1, 0, 0, 20, 20)

    [/autoit] [autoit][/autoit] [autoit]

    $Min_Label = GUICtrlCreateLabel("-", 345,5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
    GUICtrlSetFont(-1, 24, 0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetBkColor(-1, 0xFFAAAA)
    GUICtrlSetTip(-1, 'Minimieren')
    GUICtrlSetOnEvent(-1, '_Minimize')

    [/autoit] [autoit][/autoit] [autoit]

    $Close_Label = GUICtrlCreateLabel("×", 368,5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
    GUICtrlSetFont(-1, 14, 0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetBkColor(-1, 0xFFAAAA)
    GUICtrlSetTip(-1, 'Schließen')
    GUICtrlSetOnEvent(-1, '_Exit')

    [/autoit] [autoit][/autoit] [autoit]

    $Titel_Label = GUICtrlCreateLabel($titel, 0,0, 400, 30, 0x4457201, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetFont(-1, 12, 1000)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetColor(-1, 0xffffff)

    [/autoit] [autoit][/autoit] [autoit]

    _CreateColorTransition(0, 0, 400, 30, 0xFF0000, 0x0000FF, 1)
    _CreateColorTransition(0, 550, 400, 50, 0x00ADDC, 0xabcdef)

    [/autoit] [autoit][/autoit] [autoit]

    $Button1 = _GuiCreateRoundButton($Form1, 170, 100, 60, 150, '_Button', 0x202020, '', -1, @DocumentsCommonDir&'\Eigene Bilder\Beispielbilder\Winter.jpg')
    $Button2 = _GuiCreateRoundButton($Form1, 120, 300, 160, 50, '_Button', 0xFFFF00, 'Testbutton', 20)
    $Button3 = _GuiCreateRoundButton($Form1, 150, 400, 100, 100, '_Button', 0x00FF00, 'bla', -1, @DocumentsCommonDir&'\Eigene Bilder\Beispielbilder\Sonnenuntergang.jpg')

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW, $Form1)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(10000)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _Button()
    Switch @GUI_WinHandle
    Case $Button1
    MsgBox(0, "Runder Button", "Button 1 wurde gedrückt")
    Case $Button2
    MsgBox(0, "Runder Button", "Button 2 wurde gedrückt")
    Case $Button3
    MsgBox(0, "Runder Button", "Button 3 wurde gedrückt")
    EndSwitch
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Minimize()
    Sleep(100)
    GUISetState(@SW_MINIMIZE)
    EndFunc

    Func _GuiCreateRoundButton($hWndParent, $iPosx, $iPosy, $iWidth, $iHeight, $sFunc, $iColor = -1, $sText = "", $iTextSize = -1, $sFileBg = "")
    Local $ret, $ret2, $nExStyle, $Button
    If $iColor = -1 Then $iColor = 0xD4D0C8
    If $iTextSize = -1 Then $iTextSize = 10
    $Button = GUICreate("", $iWidth, $iHeight, $iPosx, $iPosy, $WS_CHILD, -1, $hWndParent)
    GUISetOnEvent($GUI_EVENT_PRIMARYUP, $sFunc)
    GUISetCursor(0, 1, $Button)
    GUISetBkColor($iColor, $Button)
    If $sFileBg <> "" Then GUICtrlCreatePic($sFileBg, 0, 0, $iWidth, $iHeight, 0, 0x00000020)
    If $sText <> "" And $sText <> -1 Then
    GUICtrlCreateLabel($sText, 0, 0, $iWidth, $iHeight, 0x0201, 0x00000008)
    GUICtrlSetFont(-1, $iTextSize, 1000)
    GUICtrlSetState(-1, $GUI_DISABLE)
    EndIf
    $ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', 0, 'long', 0, 'long', $iWidth, 'long', $iHeight, 'long', $iHeight, 'long', $iWidth)
    If $ret[0] Then
    $ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $Button, 'long', $ret[0], 'int', 1)
    If $ret2[0] Then
    GUISetState()
    Return $Button
    Else
    Return SetError(1, 0, 0)
    EndIf
    Else
    Return SetError(2, 0, 0)
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _GuiRoundCorners($hWnd, $x1, $y1, $x3, $y3)
    Local $pos, $ret, $ret2
    $pos = WinGetPos($hWnd)
    $ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', $x1, 'long', $y1, 'long', $pos[2], 'long', $pos[3], 'long', $x3, 'long', $y3)
    If $ret[0] Then
    $ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $hWnd, 'long', $ret[0], 'int', 1)
    If $ret2[0] Then
    Return 1
    Else
    Return 0
    EndIf
    Else
    Return 0
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _CreateColorTransition($iPosx, $iPosy, $iWidth, $iHeight, $nColorStart, $nColorEnd, $iAlignment = 0)
    Local $startRot, $startGruen, $startBlau, $endRot, $endGruen, $endBlau, $Color
    Local $ColorOffsetRot, $ColorOffsetGruen, $ColorOffsetBlau
    $startRot = _ColorGetRed($nColorStart)
    $startGruen = _ColorGetGreen($nColorStart)
    $startBlau = _ColorGetBlue($nColorStart)
    $endRot = _ColorGetRed($nColorEnd)
    $endGruen = _ColorGetGreen($nColorEnd)
    $endBlau = _ColorGetBlue($nColorEnd)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlCreateGraphic($iPosx, $iPosy, $iWidth, $iHeight, 0)
    GUICtrlSetState(-1, $GUI_DISABLE)

    Switch $iAlignment
    Case 0
    $ColorOffsetRot = ($endRot - $startRot) / $iHeight
    $ColorOffsetGruen = ($endGruen - $startGruen) / $iHeight
    $ColorOffsetBlau = ($endBlau - $startBlau) / $iHeight
    For $i = 0 To $iHeight -1
    $Color = '0x'&Hex($startRot + $ColorOffsetRot*($i+1),2) & Hex($startGruen + $ColorOffsetGruen*($i+1),2) & Hex($startBlau + $ColorOffsetBlau*($i+1),2)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
    GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, $iWidth, $i)
    Next
    Case Else
    $ColorOffsetRot = ($endRot - $startRot) / $iWidth
    $ColorOffsetGruen = ($endGruen - $startGruen) / $iWidth
    $ColorOffsetBlau = ($endBlau - $startBlau) / $iWidth
    For $i = 0 To $iWidth -1
    $Color = '0x'&Hex($startRot + $ColorOffsetRot*($i+1),2) & Hex($startGruen + $ColorOffsetGruen*($i+1),2) & Hex($startBlau + $ColorOffsetBlau*($i+1),2)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
    GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $i, 0)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, $i, $iHeight)
    Next
    EndSwitch
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    Sleep(100)
    Exit
    EndFunc

    [/autoit]
  • Gui-Styling ohne Bilder (Farbübergänge)

    • funkey
    • 7. Februar 2009 um 21:09

    Danke! Hab jetzt noch das Titel-Label transparent gemacht. Sieht besser aus

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Include <Color.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt("GUIOnEventMode",1)
    $titel = "Funkey's Style-Test"
    $Form1 = GUICreate($titel, 400, 600, -1, -1, $WS_POPUP)
    GUISetOnEvent($GUI_EVENT_CLOSE,"_Exit")
    GUISetBkColor(0x00ADDC)

    [/autoit] [autoit][/autoit] [autoit]

    _GuiRoundCorners($Form1, 0, 0, 20, 20)

    [/autoit] [autoit][/autoit] [autoit]

    $Min_Label = GUICtrlCreateLabel("-", 345,5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
    GUICtrlSetFont(-1, 24, 0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetBkColor(-1, 0xFFAAAA)
    GUICtrlSetTip(-1, 'Minimieren')
    GUICtrlSetOnEvent(-1, '_Minimize')

    [/autoit] [autoit][/autoit] [autoit]

    $Close_Label = GUICtrlCreateLabel("×", 368,5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
    GUICtrlSetFont(-1, 14, 0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetBkColor(-1, 0xFFAAAA)
    GUICtrlSetTip(-1, 'Schließen')
    GUICtrlSetOnEvent(-1, '_Exit')

    [/autoit] [autoit][/autoit] [autoit]

    $Titel_Label = GUICtrlCreateLabel($titel, 0,0, 400, 30, 0x4000201, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetFont(-1, 12, 1000)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetColor(-1, 0xffffff)

    [/autoit] [autoit][/autoit] [autoit]

    _CreateColorTransition(0, 0, 400, 40, 0x002CFA, 0x00ADDC)
    _CreateColorTransition(0, 550, 400, 50, 0x00ADDC, 0xabcdef)
    ;~ _CreateColorTransition(0, 50, 25, 485, 0x002CFA, 0x00ADDC, 1)
    ;~ _CreateColorTransition(375, 50, 25, 485, 0x00ADDC, 0x002CFA, 1)

    [/autoit] [autoit][/autoit] [autoit]

    $Button1 = _GuiCreateRoundButton($Form1, 170, 100, 60, 150, '_Button', 0x202020, '', -1, @DocumentsCommonDir&'\Eigene Bilder\Beispielbilder\Winter.jpg')
    $Button2 = _GuiCreateRoundButton($Form1, 120, 300, 160, 50, '_Button', 0xFFFF00, 'Testbutton', 20)
    $Button3 = _GuiCreateRoundButton($Form1, 150, 400, 100, 100, '_Button', 0x00FF00, 'bla', -1, @DocumentsCommonDir&'\Eigene Bilder\Beispielbilder\Sonnenuntergang.jpg')

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW, $Form1)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(10000)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _Button()
    Switch @GUI_WinHandle
    Case $Button1
    MsgBox(0, "Runder Button", "Button 1 wurde gedrückt")
    Case $Button2
    MsgBox(0, "Runder Button", "Button 2 wurde gedrückt")
    Case $Button3
    MsgBox(0, "Runder Button", "Button 3 wurde gedrückt")
    EndSwitch
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Minimize()
    Sleep(100)
    GUISetState(@SW_MINIMIZE)
    EndFunc

    Func _GuiCreateRoundButton($hWndParent, $iPosx, $iPosy, $iWidth, $iHeight, $sFunc, $iColor = -1, $sText = "", $iTextSize = -1, $sFileBg = "")
    Local $ret, $ret2, $nExStyle, $Button
    If $iColor = -1 Then $iColor = 0xD4D0C8
    If $iTextSize = -1 Then $iTextSize = 10
    $Button = GUICreate("", $iWidth, $iHeight, $iPosx, $iPosy, $WS_CHILD, -1, $hWndParent)
    GUISetOnEvent($GUI_EVENT_PRIMARYUP, $sFunc)
    GUISetCursor(0, 1, $Button)
    GUISetBkColor($iColor, $Button)
    If $sFileBg <> "" Then GUICtrlCreatePic($sFileBg, 0, 0, $iWidth, $iHeight, 0, 0x00000020)
    If $sText <> "" And $sText <> -1 Then
    GUICtrlCreateLabel($sText, 0, 0, $iWidth, $iHeight, 0x0201, 0x00000008)
    GUICtrlSetFont(-1, $iTextSize, 1000)
    GUICtrlSetState(-1, $GUI_DISABLE)
    EndIf
    $ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', 0, 'long', 0, 'long', $iWidth, 'long', $iHeight, 'long', $iHeight, 'long', $iWidth)
    If $ret[0] Then
    $ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $Button, 'long', $ret[0], 'int', 1)
    If $ret2[0] Then
    GUISetState()
    Return $Button
    Else
    Return SetError(1, 0, 0)
    EndIf
    Else
    Return SetError(2, 0, 0)
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _GuiRoundCorners($hWnd, $x1, $y1, $x3, $y3)
    Local $pos, $ret, $ret2
    $pos = WinGetPos($hWnd)
    $ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', $x1, 'long', $y1, 'long', $pos[2], 'long', $pos[3], 'long', $x3, 'long', $y3)
    If $ret[0] Then
    $ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $hWnd, 'long', $ret[0], 'int', 1)
    If $ret2[0] Then
    Return 1
    Else
    Return 0
    EndIf
    Else
    Return 0
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _CreateColorTransition($iPosx, $iPosy, $iWidth, $iHeight, $nColorStart, $nColorEnd, $iAlignment = 0)
    Local $startRot, $startGruen, $startBlau, $endRot, $endGruen, $endBlau, $Color
    Local $ColorOffsetRot, $ColorOffsetGruen, $ColorOffsetBlau
    $startRot = _ColorGetRed($nColorStart)
    $startGruen = _ColorGetGreen($nColorStart)
    $startBlau = _ColorGetBlue($nColorStart)
    $endRot = _ColorGetRed($nColorEnd)
    $endGruen = _ColorGetGreen($nColorEnd)
    $endBlau = _ColorGetBlue($nColorEnd)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlCreateGraphic($iPosx, $iPosy, $iWidth, $iHeight, 0)
    GUICtrlSetState(-1, $GUI_DISABLE)

    Switch $iAlignment
    Case 0
    $ColorOffsetRot = ($endRot - $startRot) / $iHeight
    $ColorOffsetGruen = ($endGruen - $startGruen) / $iHeight
    $ColorOffsetBlau = ($endBlau - $startBlau) / $iHeight
    For $i = 0 To $iHeight -1
    $Color = '0x'&Hex($startRot + $ColorOffsetRot*($i+1),2) & Hex($startGruen + $ColorOffsetGruen*($i+1),2) & Hex($startBlau + $ColorOffsetBlau*($i+1),2)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
    GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, $iWidth, $i)
    Next
    Case Else
    $ColorOffsetRot = ($endRot - $startRot) / $iWidth
    $ColorOffsetGruen = ($endGruen - $startGruen) / $iWidth
    $ColorOffsetBlau = ($endBlau - $startBlau) / $iWidth
    For $i = 0 To $iWidth -1
    $Color = '0x'&Hex($startRot + $ColorOffsetRot*($i+1),2) & Hex($startGruen + $ColorOffsetGruen*($i+1),2) & Hex($startBlau + $ColorOffsetBlau*($i+1),2)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
    GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $i, 0)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, $i, $iHeight)
    Next
    EndSwitch
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    Sleep(100)
    Exit
    EndFunc

    [/autoit]
  • Gui-Styling ohne Bilder (Farbübergänge)

    • funkey
    • 7. Februar 2009 um 20:45

    Hab jetzt noch zusätzlich zu der 'Runde Buttons'-Funktion eine Funktion geschrieben, die mir Farbübergänge macht. Sieht eigentlich auch ganz toll aus.

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Include <Color.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt("GUIOnEventMode",1)
    $titel = "Funkey's Style-Test"
    $Form1 = GUICreate($titel, 400, 600, -1, -1, $WS_POPUP)
    GUISetOnEvent($GUI_EVENT_CLOSE,"_Exit")
    GUISetBkColor(0x00ADDC)

    [/autoit] [autoit][/autoit] [autoit]

    _GuiRoundCorners($Form1, 0, 0, 20, 20)

    [/autoit] [autoit][/autoit] [autoit]

    $Min_Label = GUICtrlCreateLabel("-", 345,5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
    GUICtrlSetFont(-1, 24, 0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetBkColor(-1, 0xFFAAAA)
    GUICtrlSetTip(-1, 'Minimieren')
    GUICtrlSetOnEvent(-1, '_Minimize')

    [/autoit] [autoit][/autoit] [autoit]

    $Close_Label = GUICtrlCreateLabel("×", 368,5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
    GUICtrlSetFont(-1, 14, 0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetBkColor(-1, 0xFFAAAA)
    GUICtrlSetTip(-1, 'Schließen')
    GUICtrlSetOnEvent(-1, '_Exit')

    [/autoit] [autoit][/autoit] [autoit]

    ;~ $Titel_Label = GUICtrlCreateLabel($titel, 0,0, 400, 30, 0x4457201, $GUI_WS_EX_PARENTDRAG)
    $Titel_Label = GUICtrlCreateLabel($titel, 0,0, 400, 20, 0x4000201, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetFont(-1, 12, 1000)
    GUICtrlSetBkColor(-1, 0x002CFA)
    GUICtrlSetColor(-1, 0xffffff)

    [/autoit] [autoit][/autoit] [autoit]

    _CreateColorTransition(0, 20, 400, 15, 0x002CFA, 0x00ADDC)
    _CreateColorTransition(0, 550, 400, 50, 0x00ADDC, 0x002CFA)
    ;~ _CreateColorTransition(0, 50, 25, 485, 0x002CFA, 0x00ADDC, 1)
    ;~ _CreateColorTransition(375, 50, 25, 485, 0x00ADDC, 0x002CFA, 1)

    [/autoit] [autoit][/autoit] [autoit]

    $Button1 = _GuiCreateRoundButton($Form1, 170, 100, 60, 150, '_Button', 0x202020, '', -1, @DocumentsCommonDir&'\Eigene Bilder\Beispielbilder\Winter.jpg')
    $Button2 = _GuiCreateRoundButton($Form1, 120, 300, 160, 50, '_Button', 0xFFFF00, 'Testbutton', 20)
    $Button3 = _GuiCreateRoundButton($Form1, 150, 400, 100, 100, '_Button', 0x00FF00, 'bla', -1, @DocumentsCommonDir&'\Eigene Bilder\Beispielbilder\Sonnenuntergang.jpg')

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW, $Form1)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(10000)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _Button()
    Switch @GUI_WinHandle
    Case $Button1
    MsgBox(0, "Runder Button", "Button 1 wurde gedrückt")
    Case $Button2
    MsgBox(0, "Runder Button", "Button 2 wurde gedrückt")
    Case $Button3
    MsgBox(0, "Runder Button", "Button 3 wurde gedrückt")
    EndSwitch
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Minimize()
    Sleep(100)
    GUISetState(@SW_MINIMIZE)
    EndFunc

    Func _GuiCreateRoundButton($hWndParent, $iPosx, $iPosy, $iWidth, $iHeight, $sFunc, $iColor = -1, $sText = "", $iTextSize = -1, $sFileBg = "")
    Local $ret, $ret2, $nExStyle, $Button
    If $iColor = -1 Then $iColor = 0xD4D0C8
    If $iTextSize = -1 Then $iTextSize = 10
    $Button = GUICreate("", $iWidth, $iHeight, $iPosx, $iPosy, $WS_CHILD, -1, $hWndParent)
    GUISetOnEvent($GUI_EVENT_PRIMARYUP, $sFunc)
    GUISetCursor(0, 1, $Button)
    GUISetBkColor($iColor, $Button)
    If $sFileBg <> "" Then GUICtrlCreatePic($sFileBg, 0, 0, $iWidth, $iHeight, 0, 0x00000020)
    If $sText <> "" And $sText <> -1 Then
    GUICtrlCreateLabel($sText, 0, 0, $iWidth, $iHeight, 0x0201, 0x00000008)
    GUICtrlSetFont(-1, $iTextSize, 1000)
    GUICtrlSetState(-1, $GUI_DISABLE)
    EndIf
    $ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', 0, 'long', 0, 'long', $iWidth, 'long', $iHeight, 'long', $iHeight, 'long', $iWidth)
    If $ret[0] Then
    $ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $Button, 'long', $ret[0], 'int', 1)
    If $ret2[0] Then
    GUISetState()
    Return $Button
    Else
    Return SetError(1, 0, 0)
    EndIf
    Else
    Return SetError(2, 0, 0)
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _GuiRoundCorners($hWnd, $x1, $y1, $x3, $y3)
    Local $pos, $ret, $ret2
    $pos = WinGetPos($hWnd)
    $ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', $x1, 'long', $y1, 'long', $pos[2], 'long', $pos[3], 'long', $x3, 'long', $y3)
    If $ret[0] Then
    $ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $hWnd, 'long', $ret[0], 'int', 1)
    If $ret2[0] Then
    Return 1
    Else
    Return 0
    EndIf
    Else
    Return 0
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _CreateColorTransition($iPosx, $iPosy, $iWidth, $iHeight, $nColorStart, $nColorEnd, $iAlignment = 0)
    Local $startRot, $startGruen, $startBlau, $endRot, $endGruen, $endBlau, $Color
    Local $ColorOffsetRot, $ColorOffsetGruen, $ColorOffsetBlau
    $startRot = _ColorGetRed($nColorStart)
    $startGruen = _ColorGetGreen($nColorStart)
    $startBlau = _ColorGetBlue($nColorStart)
    $endRot = _ColorGetRed($nColorEnd)
    $endGruen = _ColorGetGreen($nColorEnd)
    $endBlau = _ColorGetBlue($nColorEnd)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlCreateGraphic($iPosx, $iPosy, $iWidth, $iHeight, 0)
    GUICtrlSetState(-1, $GUI_DISABLE)

    Switch $iAlignment
    Case 0
    $ColorOffsetRot = ($endRot - $startRot) / $iHeight
    $ColorOffsetGruen = ($endGruen - $startGruen) / $iHeight
    $ColorOffsetBlau = ($endBlau - $startBlau) / $iHeight
    For $i = 0 To $iHeight -1
    $Color = '0x'&Hex($startRot + $ColorOffsetRot*($i+1),2) & Hex($startGruen + $ColorOffsetGruen*($i+1),2) & Hex($startBlau + $ColorOffsetBlau*($i+1),2)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
    GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, $iWidth, $i)
    Next
    Case Else
    $ColorOffsetRot = ($endRot - $startRot) / $iWidth
    $ColorOffsetGruen = ($endGruen - $startGruen) / $iWidth
    $ColorOffsetBlau = ($endBlau - $startBlau) / $iWidth
    For $i = 0 To $iWidth -1
    $Color = '0x'&Hex($startRot + $ColorOffsetRot*($i+1),2) & Hex($startGruen + $ColorOffsetGruen*($i+1),2) & Hex($startBlau + $ColorOffsetBlau*($i+1),2)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
    GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $i, 0)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, $i, $iHeight)
    Next
    EndSwitch
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    Sleep(100)
    Exit
    EndFunc

    [/autoit]
  • GDI+

    • funkey
    • 7. Februar 2009 um 01:15

    So wird's auch beim wiederherstellen neugezeichnet:

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt("GUIOnEventMode", 1)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup()
    $hGUI = GUICreate("GUI")
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Ende")
    GUISetOnEvent($GUI_EVENT_RESTORE, "WM_PAINT")
    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    _GDIPlus_GraphicsDrawRect($hGraphic, 50, 50, 100, 100)

    [/autoit] [autoit][/autoit] [autoit]

    GUIRegisterMsg($WM_PAINT, "WM_PAINT")

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(10000)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func WM_PAINT($hWnd, $Msg, $wParam, $lParam)
    _GDIPlus_GraphicsDrawRect($hGraphic, 50, 50, 100, 100)
    EndFunc ;==>WM_PAINT

    [/autoit] [autoit][/autoit] [autoit]

    Func _Ende()
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    Exit
    EndFunc

    [/autoit]
  • Multiplayer-Game 'Kurven-Spiel'

    • funkey
    • 6. Februar 2009 um 20:25

    Ich wollte eigentlich das Projekt bald abschließen, aber ein paar Kleinigkeiten könnte ich euch schon noch einbauen. Aber: Pause-Funktion könnte ich machen, aber dann nicht minimieren, da dann die ganzen Linien nicht mehr neugezeichnet werden können. Minimieren könnte man nur einbauen, wenn das Spiel gerade in einer Pause ist (vor Rundenbeginn). Und dann nützt es ja eigentlich nichts.

  • Multiplayer-Game 'Kurven-Spiel'

    • funkey
    • 6. Februar 2009 um 19:57

    Vielen Dank MOZ, dass du die Aero-Abschaltung für mich in das Skript eingebaut hast. Ich hätte es ja nicht testen können.
    Vielen Dank auch dir Raupi, dass du das herausgefunden hast. Ich hatte es befürchtet, dass es mit PixelGetColor zu tun hatte. Das heißt die vorübergehende Abschaltung von Aero ist die einzige Möglichkeit, das Problem aus der welt zu schaffen. Und das hat ja MOZ für mich übernommen.

    Jetzt brauche ich mir nur noch einmal Zeit zu nehmen, um die Highscore-Funktion zu entwerfen, und dann gibt's die offizielle Version 1.4!
    Danke nochmals allen, die mir geholfen haben.

  • javascript befehl ausführen

    • funkey
    • 6. Februar 2009 um 19:06

    Vllt nützt dir dieses Skript von mir etwas: siehe Post 5 [ offen ] Router Reconnect mit Autoit

  • Linux für meinen PC

    • funkey
    • 6. Februar 2009 um 18:57

    Ich würde einfach mit Live-CD's testen, welche Distribution läuft. Da gibt's Knoppix und eben Ubuntu und andere.
    Suse ist eigentlich schon zu empfehlen, vllt lässt du dir die DVD noch mal brennen.

  • javascript befehl ausführen

    • funkey
    • 6. Februar 2009 um 18:53

    Wie willst du das Gerät neustarten, wenn du es nicht erreichen kannst :?:

    Ansonsten: Schau dir die _IEForm.....-Befehle an. Javascript kannst du nicht direkt ausführen.

  • Runde Buttons

    • funkey
    • 6. Februar 2009 um 16:26

    Hab die Funktion erweitert, bin aber noch nicht ganz zufrieden. Ich musste das Label deaktivieren, damit der Klick registriert wird, außerdem geht nur entweder Bild oder Text gleichzeitig

    Spoiler anzeigen
    [autoit]

    #include <StaticConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt("GUIOnEventMode",1)

    [/autoit] [autoit][/autoit] [autoit]

    $title = "Funkey's Test mit runden Buttons"
    $Form1 = GUICreate($title, 400, 800, -1, -1,$WS_POPUP)
    GUISetOnEvent($GUI_EVENT_CLOSE,"_Exit")
    GUISetBkColor(0x0)
    _GuiRoundCorners($Form1, 0, 0, 400, 400)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlCreateLabel($title, 0, 100, 400, 30, 0x0201)
    GUICtrlSetColor(-1,0xFFFFFF)
    GUICtrlSetFont(-1, 15, 1000)

    [/autoit] [autoit][/autoit] [autoit]

    $Button1 = _GuiCreateRoundButton($Form1, 170, 150, 60, 150, '_Button', 0x202020, '', -1, @DocumentsCommonDir&'\Eigene Bilder\Beispielbilder\Winter.jpg')
    $Button2 = _GuiCreateRoundButton($Form1, 120, 350, 160, 50, '_Button', 0xFFFF00, 'Testbutton', 20)
    $Button3 = _GuiCreateRoundButton($Form1, 150, 450, 100, 100, '_Button', 0x00FF00, 'bla', -1, @DocumentsCommonDir&'\Eigene Bilder\Beispielbilder\Sonnenuntergang.jpg')

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW, $Form1)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(10000)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _Button()
    Switch @GUI_WinHandle
    Case $Button1
    MsgBox(0, "Runder Button", "Button 1 wurde gedrückt")
    Case $Button2
    MsgBox(0, "Runder Button", "Button 2 wurde gedrückt")
    Case $Button3
    MsgBox(0, "Runder Button", "Button 3 wurde gedrückt")
    EndSwitch
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _GuiCreateRoundButton($hWndParent, $iPosx, $iPosy, $iWidth, $iHeight, $sFunc, $iColor = -1, $sText = "", $iTextSize = -1, $sFileBg = "")
    Local $ret, $ret2, $nExStyle, $Button
    If $iColor = -1 Then $iColor = 0xD4D0C8
    If $iTextSize = -1 Then $iTextSize = 10
    $Button = GUICreate("", $iWidth, $iHeight, $iPosx, $iPosy, $WS_CHILD, -1, $hWndParent)
    GUISetOnEvent($GUI_EVENT_PRIMARYUP, $sFunc)
    GUISetCursor(0, 1, $Button)
    GUISetBkColor($iColor, $Button)
    If $sFileBg <> "" Then GUICtrlCreatePic($sFileBg, 0, 0, $iWidth, $iHeight, 0, 0x00000020)
    If $sText <> "" And $sText <> -1 Then
    GUICtrlCreateLabel($sText, 0, 0, $iWidth, $iHeight, 0x0201, 0x00000008)
    GUICtrlSetFont(-1, $iTextSize, 1000)
    GUICtrlSetState(-1, $GUI_DISABLE)
    EndIf
    $ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', 0, 'long', 0, 'long', $iWidth, 'long', $iHeight, 'long', $iHeight, 'long', $iWidth)
    If $ret[0] Then
    $ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $Button, 'long', $ret[0], 'int', 1)
    If $ret2[0] Then
    GUISetState()
    Return $Button
    Else
    Return SetError(1, 0, 0)
    EndIf
    Else
    Return SetError(2, 0, 0)
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _GuiRoundCorners($hWnd, $x1, $y1, $x3, $y3)
    Local $pos, $ret, $ret2
    $pos = WinGetPos($hWnd)
    $ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', $x1, 'long', $y1, 'long', $pos[2], 'long', $pos[3], 'long', $x3, 'long', $y3)
    If $ret[0] Then
    $ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $hWnd, 'long', $ret[0], 'int', 1)
    If $ret2[0] Then
    Return 1
    Else
    Return 0
    EndIf
    Else
    Return 0
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    Exit
    EndFunc

    [/autoit]
  • Position von Image in Gui auslesen

    • funkey
    • 6. Februar 2009 um 16:09

    ?

    [autoit]

    ControlGetPos

    [/autoit]

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™