Sign in to follow this  
Followers 0
au3scr

Background image

2 posts in this topic

Hi

How to replace this blue area with background image?

as you can see window size is variable so image must be rescaled every tome script is executed.

;~ Opt("OnExitFunc", "endscript")
#include <GUIConstants.au3>
#Include <WinAPI.au3>
#include <WindowsConstants.au3>


global $pass = FileReadLine(@ScriptDir & "\settings",1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("FluxBox", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP)
GUISetBkColor(0x3A6EA5)
$MenuItem0 = GUICtrlCreateMenu("Programs")
$MenuItem01 = GUICtrlCreateMenuItem("Firefox", $MenuItem0)
$MenuItem02 = GUICtrlCreateMenuItem("Notepad", $MenuItem0)
$MenuItem03 = GUICtrlCreateMenuItem("7-Zip", $MenuItem0)
$MenuItem02 = GUICtrlCreateMenuItem("", $MenuItem0)
$MenuItem112 = GUICtrlCreateMenu("Office",$MenuItem0)
$MenuItem11211 = GUICtrlCreateMenuItem("Open Office Writer", $MenuItem112)
$MenuItem11212 = GUICtrlCreateMenuItem("Open Office Math", $MenuItem112)
$MenuItem11213 = GUICtrlCreateMenuItem("Open Office Impress", $MenuItem112)
$MenuItem11214 = GUICtrlCreateMenuItem("Open Office Draw", $MenuItem112)
$MenuItem11215 = GUICtrlCreateMenuItem("Open Office Calc", $MenuItem112)
$MenuItem11216 = GUICtrlCreateMenuItem("Open Office Base", $MenuItem112)
$MenuItem11217 = GUICtrlCreateMenuItem("Notepad 2", $MenuItem112)
$MenuItem11218 = GUICtrlCreateMenuItem("Word", $MenuItem112)
$MenuItem11219 = GUICtrlCreateMenuItem("Excel", $MenuItem112)
$MenuItem1 = GUICtrlCreateMenu("Exit")
$MenuItem11 = GUICtrlCreateMenuItem("exit", $MenuItem1)
$MenuItem12 = GUICtrlCreateMenuItem("Shutdown", $MenuItem1)
$MenuItem13 = GUICtrlCreateMenuItem("Restart", $MenuItem1)
$MenuItem14 = GUICtrlCreateMenuItem("Log Off", $MenuItem1)
$MenuItem2 = GUICtrlCreateMenu("Help")
$MenuItem20 = GUICtrlCreateMenuItem("About",$MenuItem2 )
GUICtrlCreateLabel("<Filename cannot be showen> Loaded with following stting:",10,@DesktopHeight - 100, 350,15)
$l1 = GUICtrlCreateLabel("Always On Top: OFF",10,@DesktopHeight - 85, 150,15)
$l2 = GUICtrlCreateLabel("Disable Task Mannager: OFF",10,@DesktopHeight - 70, 200,15)
$l3 = GUICtrlCreateLabel("Kill Explorer.exe: OFF",10,@DesktopHeight - 55, 150,15)
GUICtrlCreateLabel("Require password on close: ON (Cannot be changed)",10,@DesktopHeight -40, 150,15)
GUICtrlCreateLabel("Version 0.97D Beta 3",10,@DesktopHeight -115, 150,15)
GUICtrlCreateLabel(@YEAR & ":" & @MON & ":" & @MDAY ,@DesktopWidth - 150,@DesktopHeight -55, 150,15)
GUICtrlCreateLabel(@HOUR & ":" & @Min & ":" & @sec ,@DesktopWidth - 150,@DesktopHeight -40, 150,15)
;~ top ()
;~ noexp ()
;~ nodm ()
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $MenuItem11
            endscript ()
        case $MenuItem01 
        $load = FileReadLine(@ScriptDir & "\settings",5)
        Run ($load)
        case $MenuItem02 
        $load = FileReadLine(@ScriptDir & "\settings",6)
        Run ($load)
        case $MenuItem03 
        $load = FileReadLine(@ScriptDir & "\settings",7)
        Run ($load)
        case $MenuItem11211 
        $load = FileReadLine(@ScriptDir & "\settings",8)
                Run ($load)
        case $MenuItem11212 
        $load = FileReadLine(@ScriptDir & "\settings",9)
                Run ($load)
        case $MenuItem11213 
        $load = FileReadLine(@ScriptDir & "\settings",10)
                Run ($load)
        case $MenuItem11214 
        $load = FileReadLine(@ScriptDir & "\settings",11)
                Run ($load)
        case $MenuItem11215 
        $load = FileReadLine(@ScriptDir & "\settings",12)
                Run ($load)
        case $MenuItem11216 
        $load = FileReadLine(@ScriptDir & "\settings",13)
                Run ($load)
        case $MenuItem11217 
        $load = FileReadLine(@ScriptDir & "\settings",14)
                Run ($load)
        case $MenuItem11218
        $load = FileReadLine(@ScriptDir & "\settings",15)
                Run ($load)
        case $MenuItem11219
        $load = FileReadLine(@ScriptDir & "\settings",15)
                Run ($load) 
            case $MenuItem12 
                Shutdown (1)
            case $MenuItem13
                Shutdown (2)                
            case $MenuItem14
                Shutdown (0)
            Case $MenuItem20 
                MsgBox(64,"Version 0.97D Beta3","Version 0.97D Beta 3 !" & @CRLF & "Author: rain" & @CRLF & "Relased 23 feb 2008" & @CRLF & "Default settings:" & @CRLF & "Close password = toor " & @CRLF & "All parameters are turned OFF" & @CRLF & " " & @CRLF & "Try hack it")
    EndSwitch
WEnd

Func endscript ()
$Password = InputBox("Enter Password", "You must enter password to close this window", "", "*")
;~ If $Password = $pass Then
If $Password = "toor" Then
    ProcessClose("sticky.exe")
    ProcessClose("taskmgr.exe")
    ProcessClose("DisableTaskManager.exe")
        run("explorer")
    ProcessClose("flux.exe")
    Exit
Else
EndIf   
EndFunc 

func top ()
    $top = FileReadLine (@ScriptDir & "\settings",2)
    If $top = "Yes" Then
        GUICtrlSetData ($l1,"Always On Top: ON")
        WinSetOnTop("FluxBox","",1)
    If $top = "NO" Then
        GUICtrlSetData ($l1,"Always On Top: OFF")
;~  ElseIf
;~  GUICtrlSetData ($l1,"Always On Top: OFF")
    EndIf
    EndIf
EndFunc 

func noexp ()
    $noexp = FileReadLine (@ScriptDir & "\settings",3)
    If $noexp = "Yes" Then
                GUICtrlSetData ($l3,"Kill Explorer.exe: ON")
$pid = ProcessExists( "explorer.exe" )
$handle = _WinAPI_OpenProcess(0x1,0,$pid)
DllCall("kernel32.dll","int","TerminateProcess","int",$handle,"int",1)
run(@scriptdir & "\sticky.exe", @WindowsDir , 1)
    If $noexp = "No" Then
        GUICtrlSetData ($l3,"Kill Explorer.exe: OFF")
EndIf
EndIf
EndFunc 

func nodm ()
    $noexp = FileReadLine (@ScriptDir & "\settings",4)
    If $noexp = "Yes" Then
        GUICtrlSetData ($l2,"Disable Task Mannager: ON")
        run("DisableTaskManager.exe")
        If $noexp = "no" Then
        GUICtrlSetData ($l2,"Disable Task Mannager: OFF")
;~  ElseIf
;~  GUICtrlSetData ($l2,"Disable Task Mannager: OFF")
EndIf
EndIf
EndFunc 

func n ()
    sleep(100)
    msgbox(1,"t","p")
EndFunc

Share this post


Link to post
Share on other sites



;~ Opt("OnExitFunc", "endscript")
#include <GUIConstants.au3>
#Include <WinAPI.au3>
#include <WindowsConstants.au3>


global $pass = FileReadLine(@ScriptDir & "\settings",1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("FluxBox", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP)
;~ GUISetBkColor(0x3A6EA5)
    GuiCtrlCreatePic('my picture.jpg', 0, 0, @DesktopWidth, @DesktopHeight)
    GuiCtrlSetState(-1, $GUI_DISABLE)
$MenuItem0 = GUICtrlCreateMenu("Programs")
$MenuItem01 = GUICtrlCreateMenuItem("Firefox", $MenuItem0)
$MenuItem02 = GUICtrlCreateMenuItem("Notepad", $MenuItem0)
$MenuItem03 = GUICtrlCreateMenuItem("7-Zip", $MenuItem0)
$MenuItem02 = GUICtrlCreateMenuItem("", $MenuItem0)
$MenuItem112 = GUICtrlCreateMenu("Office",$MenuItem0)
$MenuItem11211 = GUICtrlCreateMenuItem("Open Office Writer", $MenuItem112)
$MenuItem11212 = GUICtrlCreateMenuItem("Open Office Math", $MenuItem112)
$MenuItem11213 = GUICtrlCreateMenuItem("Open Office Impress", $MenuItem112)
$MenuItem11214 = GUICtrlCreateMenuItem("Open Office Draw", $MenuItem112)
$MenuItem11215 = GUICtrlCreateMenuItem("Open Office Calc", $MenuItem112)
$MenuItem11216 = GUICtrlCreateMenuItem("Open Office Base", $MenuItem112)
$MenuItem11217 = GUICtrlCreateMenuItem("Notepad 2", $MenuItem112)
$MenuItem11218 = GUICtrlCreateMenuItem("Word", $MenuItem112)
$MenuItem11219 = GUICtrlCreateMenuItem("Excel", $MenuItem112)
$MenuItem1 = GUICtrlCreateMenu("Exit")
$MenuItem11 = GUICtrlCreateMenuItem("exit", $MenuItem1)
$MenuItem12 = GUICtrlCreateMenuItem("Shutdown", $MenuItem1)
$MenuItem13 = GUICtrlCreateMenuItem("Restart", $MenuItem1)
$MenuItem14 = GUICtrlCreateMenuItem("Log Off", $MenuItem1)
$MenuItem2 = GUICtrlCreateMenu("Help")
$MenuItem20 = GUICtrlCreateMenuItem("About",$MenuItem2 )
GUICtrlCreateLabel("<Filename cannot be showen> Loaded with following stting:",10,@DesktopHeight - 100, 350,15)
$l1 = GUICtrlCreateLabel("Always On Top: OFF",10,@DesktopHeight - 85, 150,15)
$l2 = GUICtrlCreateLabel("Disable Task Mannager: OFF",10,@DesktopHeight - 70, 200,15)
$l3 = GUICtrlCreateLabel("Kill Explorer.exe: OFF",10,@DesktopHeight - 55, 150,15)
GUICtrlCreateLabel("Require password on close: ON (Cannot be changed)",10,@DesktopHeight -40, 150,15)
GUICtrlCreateLabel("Version 0.97D Beta 3",10,@DesktopHeight -115, 150,15)
GUICtrlCreateLabel(@YEAR & ":" & @MON & ":" & @MDAY ,@DesktopWidth - 150,@DesktopHeight -55, 150,15)
GUICtrlCreateLabel(@HOUR & ":" & @Min & ":" & @sec ,@DesktopWidth - 150,@DesktopHeight -40, 150,15)
;~ top ()
;~ noexp ()
;~ nodm ()
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $MenuItem11
            endscript ()
        case $MenuItem01
        $load = FileReadLine(@ScriptDir & "\settings",5)
        Run ($load)
        case $MenuItem02
        $load = FileReadLine(@ScriptDir & "\settings",6)
        Run ($load)
        case $MenuItem03
        $load = FileReadLine(@ScriptDir & "\settings",7)
        Run ($load)
        case $MenuItem11211
        $load = FileReadLine(@ScriptDir & "\settings",8)
                Run ($load)
        case $MenuItem11212
        $load = FileReadLine(@ScriptDir & "\settings",9)
                Run ($load)
        case $MenuItem11213
        $load = FileReadLine(@ScriptDir & "\settings",10)
                Run ($load)
        case $MenuItem11214
        $load = FileReadLine(@ScriptDir & "\settings",11)
                Run ($load)
        case $MenuItem11215
        $load = FileReadLine(@ScriptDir & "\settings",12)
                Run ($load)
        case $MenuItem11216
        $load = FileReadLine(@ScriptDir & "\settings",13)
                Run ($load)
        case $MenuItem11217
        $load = FileReadLine(@ScriptDir & "\settings",14)
                Run ($load)
        case $MenuItem11218
        $load = FileReadLine(@ScriptDir & "\settings",15)
                Run ($load)
        case $MenuItem11219
        $load = FileReadLine(@ScriptDir & "\settings",15)
                Run ($load) 
            case $MenuItem12
                Shutdown (1)
            case $MenuItem13
                Shutdown (2)               
            case $MenuItem14
                Shutdown (0)
            Case $MenuItem20
                MsgBox(64,"Version 0.97D Beta3","Version 0.97D Beta 3 !" & @CRLF & "Author: rain" & @CRLF & "Relased 23 feb 2008" & @CRLF & "Default settings:" & @CRLF & "Close password = toor " & @CRLF & "All parameters are turned OFF" & @CRLF & " " & @CRLF & "Try hack it")
    EndSwitch
WEnd

Func endscript ()
$Password = InputBox("Enter Password", "You must enter password to close this window", "", "*")
;~ If $Password = $pass Then
If $Password = "toor" Then
    ProcessClose("sticky.exe")
    ProcessClose("taskmgr.exe")
    ProcessClose("DisableTaskManager.exe")
        run("explorer")
    ProcessClose("flux.exe")
    Exit
Else
EndIf   
EndFunc 

func top ()
    $top = FileReadLine (@ScriptDir & "\settings",2)
    If $top = "Yes" Then
        GUICtrlSetData ($l1,"Always On Top: ON")
        WinSetOnTop("FluxBox","",1)
    If $top = "NO" Then
        GUICtrlSetData ($l1,"Always On Top: OFF")
;~  ElseIf
;~  GUICtrlSetData ($l1,"Always On Top: OFF")
    EndIf
    EndIf
EndFunc 

func noexp ()
    $noexp = FileReadLine (@ScriptDir & "\settings",3)
    If $noexp = "Yes" Then
                GUICtrlSetData ($l3,"Kill Explorer.exe: ON")
$pid = ProcessExists( "explorer.exe" )
$handle = _WinAPI_OpenProcess(0x1,0,$pid)
DllCall("kernel32.dll","int","TerminateProcess","int",$handle,"int",1)
run(@scriptdir & "\sticky.exe", @WindowsDir , 1)
    If $noexp = "No" Then
        GUICtrlSetData ($l3,"Kill Explorer.exe: OFF")
EndIf
EndIf
EndFunc 

func nodm ()
    $noexp = FileReadLine (@ScriptDir & "\settings",4)
    If $noexp = "Yes" Then
        GUICtrlSetData ($l2,"Disable Task Mannager: ON")
        run("DisableTaskManager.exe")
        If $noexp = "no" Then
        GUICtrlSetData ($l2,"Disable Task Mannager: OFF")
;~  ElseIf
;~  GUICtrlSetData ($l2,"Disable Task Mannager: OFF")
EndIf
EndIf
EndFunc 

func n ()
    sleep(100)
    msgbox(1,"t","p")
EndFunc
Replace the "my picture.jpg" with your picture obviously.


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0