Tag,
das Problem liegt darin , dass wenn man auf Enter drück das Fenster verschwinden soll.
Das tut es auch , nur der Header wird noch angezeigt .... Warum ?
Script:
[autoit]
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: Marcel B.
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
[/autoit][autoit][/autoit][autoit]#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ButtonConstants.au3>
#include <GDIPlus.au3>
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
#include <StaticConstants.au3>
#include <FTPEx.au3>
#include <Array.au3>
#include <GUIConstantsEx.au3>
#include <GuiComboBox.au3>
#include <StaticConstants.au3>
#include <Array.au3>
#Region ### START Koda GUI section ### Form=
[/autoit][autoit][/autoit][autoit];~ $Pic1 = GUICtrlCreatePic("background.jpg", 0, 0, 751, 523)
;~ GUICtrlSetState(-1, $GUI_DISABLE)
Opt ('GUIOnEventMode', 1)
$WinMain = GUICreate("Form1", 705, 523, 283, 74)
GUISetOnEvent ($GUI_EVENT_CLOSE, '_LoginExit')
$Pic1 = GUICtrlCreatePic("bg3.jpg", 0, 0,705, 523)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreatePng($WinMain, "headerhbulm.png", -10, 0)
$Label3 = GUICtrlCreateLabel(" Benutzername:", 130, 220, 120, 26, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Arial Black")
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Label1 = GUICtrlCreateLabel("Probleme beim Einloggen ?", 157, 320, 132, 17)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, 0x000080)
$Label11 = GUICtrlCreateLabel("Datenschutzbestimmungen", 20, 488, 132, 17)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, 0x000080)
$Label111 = GUICtrlCreateLabel("", 160, 488, 132, 17)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, 0x000080)
;~ $Label4 = GUICtrlCreateLabel("Datenschutzbestimmungen", 0, 504, 132, 17)
;~ GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
;~ GUICtrlSetColor(-1, 0x000080)
$Label2 = GUICtrlCreateLabel("Willkommen im Control Center", 80, 98, 611, 27)
GUICtrlSetFont(-1, 12, 800, 0, "Arial Black")
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Label5 = GUICtrlCreateLabel("Kennwort:", 130, 270, 90, 26, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Arial Black")
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Input2 = GUICtrlCreateInput("Kennwort", 138, 288, 145, 28, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Input3 = GUICtrlCreateInput("Name", 138, 240, 145, 28)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
;~ GUICtrlSetColor(-1, 0x000080)
$Link = GUICtrlCreateLabel("www.LS-Roleplay.com", 160, 488, 374, 18)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, 0x000080)
$Link = GUICtrlCreateLabel("Copyright", 279, 488, 374, 18)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, 0x000080)
$LoginNow = GUICtrlCreateButton("Login", -280, -88, 75, 25, $BS_DEFPUSHBUTTON)
GUICtrlSetOnEvent($LoginNow,"_Login")
GUISetState(@SW_SHOW)
;~ GUICtrlSetData(@SW_HIDE,$hGUI )
#EndRegion ### END Koda GUI section ###
LoadCursor("1.cur", $WinMain)
LoadCursor("2.cur", GUICtrlGetHandle($Input2))
LoadCursor("3.cur", GUICtrlGetHandle($Label1))
While 1
Sleep(50)
WEnd
Func _LoginExit()
Exit
EndFunc
Func _Login()
GUISetState(@SW_HIDE,$WinMain)
GUICtrlSetData(@SW_HIDE,$hGUI )
MsgBox(0,"","Hier wird einmal das Hauptmenu sein."&@CRLF&"Aber der Header ist immernoch zu sehen :(")
EndFunc
Func LoadCursor($szFileName, $hGuiX)
$hCursor = DllCall("user32.dll", "hwnd", "LoadCursorFromFile", "str", $szFileName)
$hCursor = $hCursor[0]
If $hCursor <> 0 Then DllCall("user32.dll", "hwnd", "SetClassLong", "hwnd", $hGuiX, "int", -12, "hwnd", $hCursor)
EndFunc
Func GUICtrlCreatePng($hWnd, $sPath, $iX, $iY) ; SEuBo
_GDIPlus_Startup()
Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend
Local $hImage = _GDIPlus_ImageLoadFromFile($sPath), $iWidth = _GDIPlus_ImageGetWidth($hImage), $iHeight = _GDIPlus_ImageGetHeight($hImage)
Global $hGUI = GUICreate("", $iWidth, $iHeight, $iX, $iY, 0x80000000, BitOR(0x40, 0x80000), $hWnd)
$cLabel = GUICtrlCreateLabel("", 0, 0, $iWidth, $iHeight)
GUICtrlSetBkColor(-1, -2)
GUISetState(@SW_SHOWNOACTIVATE, $hGUI)
$hScrDC = _WinAPI_GetDC(0)
$hMemDC = _WinAPI_CreateCompatibleDC($hScrDC)
$hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
$hOld = _WinAPI_SelectObject($hMemDC, $hBitmap)
$tSize = DllStructCreate("int X;int Y")
$pSize = DllStructGetPtr($tSize)
DllStructSetData($tSize, "X", $iWidth)
DllStructSetData($tSize, "Y", $iHeight)
$tSource = DllStructCreate("int X;int Y")
$pSource = DllStructGetPtr($tSource)
$tBlend = DllStructCreate("byte Op;byte Flags;byte Alpha;byte Format")
$pBlend = DllStructGetPtr($tBlend)
DllStructSetData($tBlend, "Alpha", 255)
DllStructSetData($tBlend, "Format", 1)
_WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)
_WinAPI_ReleaseDC(0, $hScrDC)
_WinAPI_SelectObject($hMemDC, $hOld)
_WinAPI_DeleteObject($hBitmap)
_WinAPI_DeleteDC($hMemDC)
GUISwitch($hWnd)
_GDIPlus_ImageDispose($hImage)
;_GDIPlus_Shutdown()
Return SetError(0, $hGUI, $cLabel)
EndFunc ;==>GUICtrlCreatePng
Winrar Datei mit den Bildern und Source:
http://www.workupload.com/file/0wOADBc