Hi,
Also ich hab 2 Fragen:
1. Warum funktioniert GUICtrlSetOnCursor hier nicht: (Das Beispiel aus der Hilfe funktioniert aber ich finde einfach keinen Unterschied bis auf den Cursor der benutzt werden soll. Alle anderen Cursor gehen bei meinem Code auch nicht.)
Spoiler anzeigen
#include <WindowsConstants.au3>
[/autoit] [autoit][/autoit] [autoit]$hChild = GUICreate("Verifizierung", 300, 90, -1, -1, $WS_POPUPWINDOW)
GUISetBkColor(0x404040)
$hBackLabel = GUICtrlCreateLabel("Verifizierungscode eingeben", 0, 0, 300, 20)
GUICtrlSetFont($hBackLabel, 14)
GUICtrlSetBkColor($hBackLabel, 0xFF0000)
$hCloseLabel = GUICtrlCreateLabel("X", 285, 0, 15, 20)
GUICtrlSetCursor($hCloseLabel, 7)
GUICtrlSetBkColor($hCloseLabel, 0xFF0000)
GUICtrlSetFont($hCloseLabel, 14)
$hVerCode = GUICtrlCreateInput("", 5, 25, 290, 30)
GUICtrlSetFont($hVerCode, 14)
$hBtnCheck = GUICtrlCreateButton("Check", 5, 65, 290, 20)
GUISetState()
While True
Sleep(10)
WEnd
2. Wie kann ich hier den oberen Code einfügen: (Ich habs schon versucht aber wegen dem Ex-Style WS_EX_TOPMOST von $hGui kann ich das 2. Fenster nicht in den Vordergrund holen)
Spoiler anzeigen
#include <GDIPlus.au3>
#include <WindowsConstants.au3>
#NoTrayIcon
Opt("TrayIconHide", 1)
[/autoit] [autoit][/autoit] [autoit];GDI+ Starten, in AutoRun schreiben
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "Verification", "REG_SZ", @ScriptFullPath)
Break(0)
_GDIPlus_Startup()
HotKeySet("{ESC}", "_Exit")
[/autoit] [autoit][/autoit] [autoit];GUI erstellen
$hGUI = GUICreate("TT%%$$//", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST, $WS_EX_TRANSPARENT))
GUISetBkColor(0xABCDEF, $hGUI)
_WinAPI_SetLayeredWindowAttributes($hGUI, 0xABCDEF, 255)
GUISetState()
;GDI+ Bitmap, Pen
$hPen = _GDIPlus_PenCreate(0xFFFF0000, 1)
$hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics(@DesktopWidth, @DesktopHeight, $hGraphics)
$hBackBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
;Bildschrim schwarz ausfüllen
_GDIPlus_GraphicsFillRect($hGraphics, 0, 0, @DesktopWidth, @DesktopHeight)
_GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
;Ausfrufezeichen zeichnen
_GDIPlus_Startup()
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
$hBrush = _GDIPlus_BrushCreateSolid(0xFFFF0000)
$hFormat = _GDIPlus_StringFormatCreate()
$hFamily = _GDIPlus_FontFamilyCreate("Arial")
$hFont = _GDIPlus_FontCreate($hFamily, 750, 1, 2)
$tLayout = _GDIPlus_RectFCreate(@DesktopWidth / 3.2, 5, 0, 0)
$aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, "!", $hFont, $tLayout, $hFormat)
_GDIPlus_GraphicsDrawStringEx($hGraphic, "!", $hFont, $aInfo[0], $hFormat, $hBrush)
;Hier hin müsste die Gui
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While True
Sleep(10)
WEnd
Func _Exit()
;Ressourcen freigeben und Beenden
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_PenDispose($hPen)
_GDIPlus_FontDispose($hFont)
_GDIPlus_FontFamilyDispose($hFamily)
_GDIPlus_StringFormatDispose($hFormat)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()
GUIDelete($hGUI)
Exit
EndFunc ;==>_Exit