Hi,
mach mir grad ein script wo man auch fremde programm einbinden soll und zwar ohne den blauen rand und will dann auch noch eine x button drübermalen.
Hoffe ihr könnt mir helfen und mir vielleicht auch ein beispiel zeigen.
danke
der ordner ist leider zu groß zum dranghängen habs jezt mit megaupload gemacht
Spoiler anzeigen
#include <StaticConstants.au3>
#include <GDIPlus.au3>
#include <Misc.au3>
#include <Array.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <Constants.au3>
#include <WinAPI.au3>
$desktop = True
$einstellungen = False
$start_ispressed = False
$start_window_high = 100
$start_window_with = 280
;FileDelete("C:\Dokumente und Einstellungen\Alfred\Desktop\bts\bts\System\Main_System\Settings\Desktophintergrund.wina")
;FileWrite("C:\Dokumente und Einstellungen\Alfred\Desktop\bts\bts\System\Main_System\Settings\desktophintergrund.wina","C:\Dokumente und Einstellungen\Alfred\Desktop\bts\bts\System\Data1\Desktop\Hügellandschaft")
$load_hintergrundbild_desktop = FileRead(@ScriptDir & "\Settings\desktophintergrund.wina")
$hWnd = GUICreate("System", @DesktopWidth, @DesktopHeight,0,0,$WS_POPUP)
GUISetBkColor(0x0000000)
_GDIPlus_Startup()
$Hintergrundbild_Desktop = _GDIPlus_ImageLoadFromFile($load_hintergrundbild_desktop)
$Start_Button = _GDIPlus_ImageLoadFromFile(StringReplace(@ScriptDir,"\Main_System","\Data1\Images\Start_Button.png"))
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics(@DesktopWidth, @DesktopHeight, $hGraphic)
$hBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
$hbrushweiss = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
$hbrushblau = _GDIPlus_BrushCreateSolid(0xFF4400EE)
$hPid = Run(@SystemDir & '\notepad.exe', "", @SW_HIDE)
WinWait("[CLASS:Notepad]")
$a = WinGetPos("[CLASS:Notepad]")
;MsgBox(0,"",$a[2]&":"& $a[3])
;$gui = GUICreate("", $a[2], $a[3],@DesktopWidth/2,@DesktopHeight/2,0,$WS_POPUP,$WS_EX_TOPMOST)
$hChild = WinGetHandle("[CLASS:Notepad]")
WinMove("[CLASS:Notepad]","",0,0,$a[2],$a[3],1)
_WinAPI_SetParent($hChild, $hwnd)
_WinAPI_SetWindowLong($hChild, $GWL_STYLE, BitOR($WS_POPUP,$WS_EX_TOPMOST,$WS_EX_CLIENTEDGE))
WinSetState($hChild, "", @SW_SHOW)
;WinSetState("[Class:Shell_TrayWnd]","",@SW_HIDE)
;WinSetState("Start","",@SW_HIDE)
GUISetState(@SW_SHOW,$hwnd)
;GUISetState(@SW_SHOW,$gui)
ProcessExists(ProcessClose("wina_startup.exe"))
While 1
$maus = GUIGetCursorInfo($hwnd)
If Not($maus = "") Then
_check_mouse_datas()
If $maus[0] >= 0 And $maus[0] <= 280 And $maus[1] >=@DesktopHeight-40 And $maus[1] <=@DesktopHeight And _IsPressed(01) Then
$start_ispressed = True
;SP-WKJ2N-4QQZE-7FJGW-6W95Y-GWYH5-W4YYF
Sleep(300)
EndIf
If $desktop = True Then
_GDIPlus_GraphicsDrawImageRect($hBuffer, $Hintergrundbild_Desktop,0, 0, @DesktopWidth,@DesktopHeight )
$desktop = False
EndIf
_check_mouse_datas()
If $start_ispressed = True Then
_check_mouse_datas()
_GDIPlus_GraphicsFillRect($hbuffer,0,@desktopheight-35-$start_window_high,$start_window_with,$start_window_high,$hbrushweiss)
_GDIPlus_GraphicsFillRect($hbuffer,$start_window_with-2,@desktopheight-35-$start_window_high,2,$start_window_high,$hbrushblau)
_GDIPlus_GraphicsFillRect($hbuffer,0,@desktopheight-35-$start_window_high,2,$start_window_high,$hbrushblau)
$create_start_lines = $start_window_high/50
$create_start_lines_2 = 0
$create_start_lines_high = @desktopheight - 35
While Not($create_start_lines <= $create_start_lines_2)
$create_start_lines_2 += 1
$create_start_lines_high -= 50 ;805
If $maus[0] >= 0 And $maus[0] <= $start_window_with And $maus[1] < $create_start_lines_high +50 And $maus[1] >= $create_start_lines_high Then _GDIPlus_GraphicsFillRect($hbuffer,0,$create_start_lines_high,$start_window_with,50,$hbrushblau)
_GDIPlus_GraphicsFillRect($hbuffer,0,$create_start_lines_high,$start_window_with,2,$hbrushblau)
WEnd
_check_mouse_datas()
_GDIPlus_GraphicsDrawString($hBuffer,"Herunterfahren",40,@desktopheight - 75,"Arial",20)
_GDIPlus_GraphicsDrawString($hBuffer,"Einstellungen",40,@DesktopHeight -125,"Arial",20)
If _IsPressed(01) Then
$start_ispressed = False
$desktop = True
EndIf
EndIf
_check_mouse_datas()
_GDIPlus_GraphicsDrawImageRect($hBuffer, $Start_Button,-10, @DesktopHeight-40, 300,50)
If $einstellungen = True Then _einstellungen()
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, @DesktopWidth, @DesktopHeight)
EndIf
Sleep(10)
WEnd
Func _exit()
FileDelete(@ScriptDir & "\Settings\desktophintergrund.wina")
FileWrite(@ScriptDir & "\Settings\desktophintergrund.wina",$load_hintergrundbild_desktop &StringSplit($load_hintergrundbild_desktop, ".",1))
_GDIPlus_BrushDispose($hbrushweiss)
_GDIPlus_BrushDispose($hbrushblau)
_GDIPlus_GraphicsDispose($hgraphic)
_GDIPlus_BitmapDispose($hbitmap)
_GDIPlus_Shutdown()
WinSetState("[Class:Shell_TrayWnd]","",@SW_SHOW)
WinSetState("Start","",@SW_SHOW)
Exit
EndFunc
Func _einstellungen()
_GDIPlus_GraphicsFillRect($hbuffer,@DesktopWidth/2-250,@DesktopHeight/2-250,500,500,$hbrushweiss)
_GDIPlus_GraphicsFillRect($hbuffer,@DesktopWidth/2-250,@DesktopHeight/2-250,2,500,$hbrushblau)
_GDIPlus_GraphicsFillRect($hbuffer,@DesktopWidth/2,@DesktopHeight/2-250,2,500,$hbrushblau)
_GDIPlus_GraphicsFillRect($hbuffer,@DesktopWidth/2+250,@DesktopHeight/2-250,2,500,$hbrushblau)
$create_einstellungen_lines_high = @DesktopHeight/2-300
For $i = 0 To 9
$create_einstellungen_lines_high += 50
If $maus[0] >= @DesktopWidth/2-250 And $maus[0] <@DesktopWidth/2 And $maus[1] < $create_einstellungen_lines_high +50 And $maus[1] >= $create_einstellungen_lines_high Then _GDIPlus_GraphicsFillRect($hbuffer,@DesktopWidth/2-250,$create_einstellungen_lines_high,250,50,$hbrushblau)
If $maus[0] >= @DesktopWidth/2 And $maus[0] <=@DesktopWidth/2 +250 And $maus[1] < $create_einstellungen_lines_high +50 And $maus[1] >= $create_einstellungen_lines_high Then _GDIPlus_GraphicsFillRect($hbuffer,@DesktopWidth/2,$create_einstellungen_lines_high,250,50,$hbrushblau)
_GDIPlus_GraphicsFillRect($hbuffer,@DesktopWidth/2-250,$create_einstellungen_lines_high,500,2,$hbrushblau)
Next
$create_einstellungen_lines_high += 50
_GDIPlus_GraphicsFillRect($hbuffer,@DesktopWidth/2-250,$create_einstellungen_lines_high,500,2,$hbrushblau)
_GDIPlus_GraphicsDrawString($hBuffer,"Hintergrund",@DesktopWidth/2-200,@DesktopHeight/2-240,"Arial",20)
EndFunc
Func _check_mouse_datas()
If $einstellungen = True And _IsPressed(01) And $maus[0] >= @DesktopWidth/2-250 And $maus[0] < @DesktopWidth/2 And $maus[1] >=@DesktopHeight/2-250 And $maus[1] < @DesktopHeight/2-200 Then
$load_Hintergrundbild_desktop = FileOpenDialog("Bitte wählen sie ihren Hintergrund aus",StringReplace(@ScriptDir,"\Main_System","") & "\Data1\Desktop","Images (*.*)")
$Hintergrundbild_Desktop = _GDIPlus_ImageLoadFromFile($load_hintergrundbild_desktop)
$desktop = True
EndIf
If $einstellungen = True And _IsPressed(01) And Not($maus[0] >=@DesktopWidth/2-250 And $maus[0] <=@DesktopWidth/2+250 And $maus[1] >=@DesktopHeight/2-250 And $maus[1] <=@DesktopHeight/2+250) Then
$einstellungen = False
$desktop = True
EndIf
If $start_ispressed = True And $maus[0] >= 0 And $maus[0] <= $start_window_with And $maus[1] < @desktopheight -35 And $maus[1] >= @desktopheight -85 And _IsPressed(01) Then _exit()
If $start_ispressed = True And $maus[0] >= 0 And $maus[0] <= $start_window_with And $maus[1] < @desktopheight -85 And $maus[1] >= @desktopheight -135 And _IsPressed(01) Then
$desktop = True
$start_ispressed = False
$einstellungen = True
Sleep(300)
EndIf
EndFunc
;StringSplit($filepath, ".",1)
;StringTrimLeft($pfad, StringInStr($pfad, ".", 0, -1)