3000 Ich brauche HILFE

    • Offizieller Beitrag

    Hi zusammen,

    ich brauche dringend ein neues Hobby :D

    Spoiler anzeigen
    [autoit]

    Opt("OnExitFunc", "endscript")
    #include <GUIConstants.au3>
    $hwnd = GUICreate("Text Region", @DesktopWidth, @DesktopHeight, @DesktopWidth / 2 - 250, @DesktopHeight / 2 - 150, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
    GUISetBkColor(0x00FF00)
    Send("#m")
    GUISetState()

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

    ControlHide("Program Manager", "", "[CLASSNN:SHELLDLL_DefView1]")
    While 1
    $rgn = CreateTextRgn($hwnd, 3000, 250, "Arial", 1000)
    SetWindowRgn($hwnd, $rgn)
    Sleep(500)
    WEnd

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

    Func endscript()
    ControlShow("Program Manager", "", "[CLASSNN:SHELLDLL_DefView1]")
    EndFunc ;==>endscript

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

    Func SetWindowRgn($h_win, $rgn)
    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1)
    EndFunc ;==>SetWindowRgn

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

    Func CreateTextRgn(ByRef $CTR_hwnd, $CTR_Text, $CTR_height, $CTR_font = "Microsoft Sans Serif", $CTR_weight = 1000)
    Local Const $ANSI_CHARSET = 0
    Local Const $OUT_CHARACTER_PRECIS = 2
    Local Const $CLIP_DEFAULT_PRECIS = 0
    Local Const $PROOF_QUALITY = 2
    Local Const $FIXED_PITCH = 1
    Local Const $RGN_XOR = 3

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

    If $CTR_font = "" Then $CTR_font = "Microsoft Sans Serif"
    If $CTR_weight = -1 Then $CTR_weight = 1000
    Local $gdi_dll = DllOpen("gdi32.dll")
    Local $CTR_hDC = DllCall("user32.dll", "int", "GetDC", "hwnd", $CTR_hwnd)
    Local $CTR_hMyFont = DllCall($gdi_dll, "hwnd", "CreateFont", "int", $CTR_height, "int", 0, "int", 0, "int", 0, _
    "int", $CTR_weight, "int", 0, "int", 0, "int", 0, "int", $ANSI_CHARSET, "int", $OUT_CHARACTER_PRECIS, _
    "int", $CLIP_DEFAULT_PRECIS, "int", $PROOF_QUALITY, "int", $FIXED_PITCH, "str", $CTR_font)
    Local $CTR_hOldFont = DllCall($gdi_dll, "hwnd", "SelectObject", "int", $CTR_hDC[0], "hwnd", $CTR_hMyFont[0])
    DllCall($gdi_dll, "int", "BeginPath", "int", $CTR_hDC[0])
    DllCall($gdi_dll, "int", "TextOut", "int", $CTR_hDC[0], "int", 0, "int", 0, "str", $CTR_Text, "int", StringLen($CTR_Text))
    DllCall($gdi_dll, "int", "EndPath", "int", $CTR_hDC[0])
    Local $CTR_hRgn1 = DllCall($gdi_dll, "hwnd", "PathToRegion", "int", $CTR_hDC[0])
    Local $CTR_rc = DllStructCreate("int;int;int;int")
    DllCall($gdi_dll, "int", "GetRgnBox", "hwnd", $CTR_hRgn1[0], "ptr", DllStructGetPtr($CTR_rc))
    Local $CTR_hRgn2 = DllCall($gdi_dll, "hwnd", "CreateRectRgnIndirect", "ptr", DllStructGetPtr($CTR_rc))
    DllCall($gdi_dll, "int", "CombineRgn", "hwnd", $CTR_hRgn2[0], "hwnd", $CTR_hRgn2[0], "hwnd", $CTR_hRgn1[0], "int", $RGN_XOR)
    DllCall($gdi_dll, "int", "DeleteObject", "hwnd", $CTR_hRgn1[0])
    DllCall("user32.dll", "int", "ReleaseDC", "hwnd", $CTR_hwnd, "int", $CTR_hDC[0])
    DllCall($gdi_dll, "int", "SelectObject", "int", $CTR_hDC[0], "hwnd", $CTR_hOldFont[0])
    DllClose($gdi_dll)
    Return $CTR_hRgn2[0]
    EndFunc ;==>CreateTextRgn

    [/autoit]

    So long,

    Mega

  • ||

    Was man mit den Windows Libraries alles anfangen kann. Was ich mich frage oder direkt Dich, woher weißt du wie man die Libraries nutzt? Enpacken und Funktionen durchschnuppern?

    Neues Hobby gefällig? Wie wärs mit Trettbootfahren. :P

    ||

    Einmal editiert, zuletzt von zio82draw (30. Oktober 2007 um 12:49)

  • Hallo Xenobiologist.

    Cool. Wenn man die 3000 entfernt, kann man gut sein Desktop verstecken. Einfach eine Tastenkombination und wennd er Chef kommt, dann hat man ein sauberen Desktop. :D

    LG, Lina.

    Lieben Gruß,
    Alina

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Geheime Information: ;)
    OuBVU5ebLhHu5QvlnAyQB4A7SzBrvWulwL7RLl2BdH5tI6sIYspeMKeXMSXl

  • Sorry - hab was vergessen. Hier noch mal in korrektem Deutsch:
    Wie kann man direkt auf den Desktop schreiben, so dass man in den Fenster etwas betätigen kann, diese lesen etc. und so dass kein Symbol in der Windowsleiste(Die mit dem Startknopf) zu sehen ist sowie keine Titelleiste.

    Jetzt verständlich ? :D

    Projekte: Keine größeren (und fertigen)
    Gegen Internetzensur:
    https://epetitionen.bundestag.de/index.php?acti…s;petition=3860
    (Zeichnungsfrist abgelaufen)
    __________________________________________________________________________________________________________________________________
    Dieser Beitrag wurde bereits 264 mal editiert, zuletzt von »Fast2« (30. Februar 2009, 12:99)

    Einmal editiert, zuletzt von Fast2 (8. November 2007 um 20:58)

  • Ach so. Ich hab halt die Angewohnheit dass ich erst frag und mir dann Ellenlange Hilfen anschau ;)

    Projekte: Keine größeren (und fertigen)
    Gegen Internetzensur:
    https://epetitionen.bundestag.de/index.php?acti…s;petition=3860
    (Zeichnungsfrist abgelaufen)
    __________________________________________________________________________________________________________________________________
    Dieser Beitrag wurde bereits 264 mal editiert, zuletzt von »Fast2« (30. Februar 2009, 12:99)

    Einmal editiert, zuletzt von Fast2 (8. November 2007 um 21:50)

    • Offizieller Beitrag

    Okay, dies ist der 5000 post. Dafür habe ich mal eben schnell was zusammekopiert :P

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <FontConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    Opt("OnExitFunc", "endscript")
    Global Const $Pi = 3.1415926535897932384626
    Global Const $width = @DesktopWidth+ 100
    Global Const $height = @DesktopHeight+100
    Global $hGUI, $hWnd, $hGraphic, $ParticleBitmap, $ParticleBuffer, $hBrush0, $hBrush1, $hBrush2, $Pen
    Global $starting_point, $i, $j, $k, $xcoord1, $ycoord1, $xcoord2, $ycoord2, $size, $red, $green, $blue, $start

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

    ; Create GUI
    $hGUI = GUICreate("", $width, $height, -50, -50, $WS_POPUP, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
    $hWnd = WinGetHandle($hGUI)
    Send("#m")
    GUISetState()
    ControlHide("Program Manager", "", "[CLASSNN:SHELLDLL_DefView1]")

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

    Global $s = TimerInit()

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

    ; Draw an ellipse
    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd) ;create graphic
    $ParticleBitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $hGraphic) ;create bitmap
    $ParticleBuffer = _GDIPlus_ImageGetGraphicsContext($ParticleBitmap) ;create buffer
    $hBrush1 = _GDIPlus_BrushCreateSolid(0x7F777777)
    AntiAlias($ParticleBuffer, 4)
    _GDIPlus_GraphicsClear($ParticleBuffer) ;clear buffer

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

    $start = -25
    $i = $start
    $starting_point = 0
    ; Loop until user exits
    Do
    $red = ((Sin(2 ^ 0 * $i / 2 ^ 5) + 1) / 2) * 256
    $green = ((Sin(2 ^ 0 * $i / 2 ^ 7) + 1) / 2) * 256
    $blue = ((Sin(2 ^ 0 * $i / 2 ^ 9) + 1) / 2) * 256
    $hBrush1 = _GDIPlus_BrushCreateSolid("0x0F" & Hex($red, 2) & Hex($green, 2) & Hex($blue, 2))
    $Pen = _GDIPlus_PenCreate("0xEF" & Hex($red, 2) & Hex($green, 2) & Hex($blue, 2), 1)
    _GDIPlus_GraphicsClear($ParticleBuffer) ;clear buffer
    $k = 2 ^ 9
    $starting_point -= 0.05
    For $j = 1 To $k Step 8
    $size = $i - $j
    $xcoord1 = $width / 2 - (($i - $j) / 2) + Sin($starting_point) * - Sin(($i - $j) * $Pi / 90) * 64
    $ycoord1 = $height / 2 - (($i - $j) / 2) + - Cos($starting_point) * Cos(($i - $j) * $Pi / 90) * 32
    $xcoord2 = $width / 2 - (-($i - $j) / 2) + Sin($starting_point) * - Sin(($i - $j) * $Pi / 90) * 64
    $ycoord2 = $height / 2 - (($i - $j) / 2) + - Cos($starting_point) * Cos(($i - $j) * $Pi / 90) * 32
    _GDIPlus_GraphicsDrawRect($ParticleBuffer, $xcoord1, $ycoord1, $size, $size, $Pen)
    ;~ _GDIPlus_GraphicsFillRect($ParticleBuffer, $xcoord1, $ycoord1, $size, $size, $hBrush1)
    Next
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $ParticleBitmap, 0, 0, $width, $height) ;copy to bitmap
    $i += 2
    If $i > $k + 2 ^ 9 Then $i = $start
    Sleep(20)
    Until GUIGetMsg() = $GUI_EVENT_CLOSE Or TimerDiff($s) > 8000

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

    ; Clean up resources
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_BitmapDispose($ParticleBitmap)
    _GDIPlus_GraphicsDispose($ParticleBuffer)
    _GDIPlus_BrushDispose($hBrush1)
    _GDIPlus_Shutdown()

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

    GUIDelete($hGUI)
    Sleep(500)

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

    $hWnd = GUICreate("Text Region", $width, $height, 10, @DesktopHeight / 2 - 150, $WS_POPUP, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
    GUISetBkColor(0x00FF00)
    GUISetState()

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

    While 1
    $rgn = CreateTextRgn($hWnd, 5000 & "Posts", 250, "Arial", 1000)
    SetWindowRgn($hWnd, $rgn)
    Sleep(500)
    If TimerDiff($s) > 15000 Then Exit
    WEnd

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

    Func endscript()
    ControlShow("Program Manager", "", "[CLASSNN:SHELLDLL_DefView1]")
    EndFunc ;==>endscript

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

    Func SetWindowRgn($h_win, $rgn)
    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1)
    EndFunc ;==>SetWindowRgn

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

    Func CreateTextRgn(ByRef $CTR_hwnd, $CTR_Text, $CTR_height, $CTR_font = "Microsoft Sans Serif", $CTR_weight = 1000)
    Local Const $ANSI_CHARSET = 0
    Local Const $OUT_CHARACTER_PRECIS = 2
    Local Const $CLIP_DEFAULT_PRECIS = 0
    Local Const $PROOF_QUALITY = 2
    Local Const $FIXED_PITCH = 1
    Local Const $RGN_XOR = 3

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

    If $CTR_font = "" Then $CTR_font = "Microsoft Sans Serif"
    If $CTR_weight = -1 Then $CTR_weight = 1000
    Local $gdi_dll = DllOpen("gdi32.dll")
    Local $CTR_hDC = DllCall("user32.dll", "int", "GetDC", "hwnd", $CTR_hwnd)
    Local $CTR_hMyFont = DllCall($gdi_dll, "hwnd", "CreateFont", "int", $CTR_height, "int", 0, "int", 0, "int", 0, _
    "int", $CTR_weight, "int", 0, "int", 0, "int", 0, "int", $ANSI_CHARSET, "int", $OUT_CHARACTER_PRECIS, _
    "int", $CLIP_DEFAULT_PRECIS, "int", $PROOF_QUALITY, "int", $FIXED_PITCH, "str", $CTR_font)
    Local $CTR_hOldFont = DllCall($gdi_dll, "hwnd", "SelectObject", "int", $CTR_hDC[0], "hwnd", $CTR_hMyFont[0])
    DllCall($gdi_dll, "int", "BeginPath", "int", $CTR_hDC[0])
    DllCall($gdi_dll, "int", "TextOut", "int", $CTR_hDC[0], "int", 0, "int", 0, "str", $CTR_Text, "int", StringLen($CTR_Text))
    DllCall($gdi_dll, "int", "EndPath", "int", $CTR_hDC[0])
    Local $CTR_hRgn1 = DllCall($gdi_dll, "hwnd", "PathToRegion", "int", $CTR_hDC[0])
    Local $CTR_rc = DllStructCreate("int;int;int;int")
    DllCall($gdi_dll, "int", "GetRgnBox", "hwnd", $CTR_hRgn1[0], "ptr", DllStructGetPtr($CTR_rc))
    Local $CTR_hRgn2 = DllCall($gdi_dll, "hwnd", "CreateRectRgnIndirect", "ptr", DllStructGetPtr($CTR_rc))
    DllCall($gdi_dll, "int", "CombineRgn", "hwnd", $CTR_hRgn2[0], "hwnd", $CTR_hRgn2[0], "hwnd", $CTR_hRgn1[0], "int", $RGN_XOR)
    DllCall($gdi_dll, "int", "DeleteObject", "hwnd", $CTR_hRgn1[0])
    DllCall("user32.dll", "int", "ReleaseDC", "hwnd", $CTR_hwnd, "int", $CTR_hDC[0])
    DllCall($gdi_dll, "int", "SelectObject", "int", $CTR_hDC[0], "hwnd", $CTR_hOldFont[0])
    DllClose($gdi_dll)
    Return $CTR_hRgn2[0]
    EndFunc ;==>CreateTextRgn

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

    Func AntiAlias($hGraphics, $iMode)
    Local $aResult
    $aResult = DllCall($ghGDIPDll, "int", "GdipSetSmoothingMode", "hwnd", $hGraphics, "int", $iMode)
    If @error Then Return SetError(@error, @extended, False)
    Return SetError($aResult[0], 0, $aResult[0] = 0)
    EndFunc ;==>AntiAlias

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

    Mega