Jump to content
Sign in to follow this  
HAL9000

Trans GUI

Recommended Posts

youknowwho4eva

Hmmmm, What does it do? Is the source in that rar? I don't think I trust a rar.


Giggity

Share this post


Link to post
Share on other sites
HAL9000

Hmmmm, What does it do? Is the source in that rar? I don't think I trust a rar.

what is wrong in the rar files?

rar or zip or 7z

what is the difference?

they are not exe

download and extract files with winrar or 7-zip

it easy

if it is necessary virustotal is forever your friend

This is the code but you need images

inside rar file

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.0.0
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <ProgressConstants.au3>
#include <Constants.au3>
#include <StaticConstants.au3>
#NoTrayIcon

Opt("TrayMenuMode",1)   
HotKeySet ("{F6}", "hide")
$1= GUICreate("TRANS GUI",700,550,-1,-1,$WS_POPUP,$WS_EX_CLIENTEDGE)
$pic = GUICtrlCreatePic("bin\bg" &random (1,8,1) & ".jpg",0,0,700,550);change bgX.jpg with your jpeg
GuiCtrlSetState(-1,$GUI_DISABLE)

WinSetOnTop("TRANS","",1)
GUISetState(@SW_SHOW,$1)
$2= GUICreate("GUI",700,550,-1,-1,$WS_POPUP,$WS_EX_MDICHILD,$1)
WinSetTrans ("GUI","",0)
WinSetOnTop("GUI","",1)
GUISetState(@SW_SHOW,$2)
$progressbar1 = GUICtrlCreateProgress(0, 540, 700, 10, $PBS_SMOOTH )
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle(-1), "wstr", 0, "wstr", 0)
$close = GUICtrlCreateIcon ("bin\close.ico",-1,700-16,0,16,16)
$w = GUICtrlCreateLabel("0",300,250,150,60)
GUICtrlSetFont(-1, 20, 800)


;------------------------MENU FILE
$filemenu = GUICtrlCreateLabel("File", 3, 0, 25, 15 )
GUICtrlSetFont(-1, 10, 800)
$filesDummy = GUICtrlCreateDummy()
$fileContext = GUICtrlCreateContextMenu($filesDummy)
$fileopen = GUICtrlCreateMenuItem("Background", $fileContext)
GUICtrlCreateMenuItem("", $fileContext)
$OptionsExit = GUICtrlCreateMenuItem("Exit", $fileContext)

;--------------------Menu EDIT
$editmenu = GUICtrlCreatelabel("Edit", 33, 0, 30, 15)
GUICtrlSetFont(-1, 10, 800)
$editDummy = GUICtrlCreateDummy()
$editContext = GUICtrlCreateContextMenu($editDummy)
$editcopy = GUICtrlCreateMenuItem("Copy", $editDummy)
$editpaste = GUICtrlCreateMenuItem("Past", $editDummy)

;---------------------MENU HELP
$helpmenu = GUICtrlCreatelabel("Help", 63, 0, 35, 15 )
GUICtrlSetFont(-1, 10, 800)
$HelpDummy = GUICtrlCreateDummy()
$HelpContext = GUICtrlCreateContextMenu($HelpDummy)
$HelpWWW = GUICtrlCreateMenuItem("Website", $HelpContext)
GUICtrlCreateMenuItem("", $HelpContext)
$HelpAbout = GUICtrlCreateMenuItem("Help", $HelpContext)
$helpregister = GUICtrlCreateMenuItem("License", $helpContext)

;-------------------LINE
$line = GUICtrlCreateGraphic(0, 16,700,2)
GUICtrlSetGraphic($line, $GUI_GR_LINE, 0,0) 
GUICtrlSetColor(-1, 0)
;-----------------ICONS
GUICtrlCreateIcon("shell32.dll",-100,0,25,32,32,$SS_SUNKEN  )
GUICtrlCreateIcon("shell32.dll",-4,32,25,32,32,$SS_SUNKEN )
GUICtrlCreateIcon("shell32.dll",-7,64,25,32,32,$SS_SUNKEN )
for $a = 0 to 100 step 2
sleep(1)
WinSetTrans ("GUI","",$a*1.5)
GUICtrlSetData($progressbar1, $a )
GUICtrlSetData($w, $a& " %")
next
GUICtrlDelete($w)

while 1
sleep(1)
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE or $msg = $OptionsExit Then ExitLoop
If $msg = $close Then ExitLoop
if $msg =$filemenu then ShowMenu($2, $msg, $fileContext)
if $msg =$helpregister then InputBox("License", "Type your license key",""," ",Default,Default,Default,Default,Default,$2)
if $msg = $helpmenu then ShowMenu($2, $msg, $HelpContext)
if $msg = $editmenu then ShowMenu($2, $msg, $editContext)   
if $msg = $fileopen then 
    $var = FileOpenDialog("Select a file", @scriptDir & "\bin", "Images (*.jpg)", 1 ,"",$2 )
    GUICtrlSetImage($pic,$var)
    endif
;FileSelectFolder("Select","",6,"",$2)
if $msg = $HelpAbout then msgbox(64,"Help","F6 Hide/Show Gui"& @crlf & "File/Background to change background",Default,$2)
    wend
;  -------------- func 
func hide()
GUISetState(@SW_HIDE,$1)
GUISetState(@SW_HIDE,$2)
HotKeySet ("{F6}", "show")
endfunc

func show()
GUISetState(@SW_SHOW,$1)
GUISetState(@SW_SHOW,$2)
HotKeySet ("{F6}", "hide")
endfunc

; Show a menu in a given GUI window which belongs to a given GUI ctrl
Func ShowMenu($hWnd, $CtrlID, $nContextID)
    Local $arPos, $x, $y
    Local $hMenu = GUICtrlGetHandle($nContextID)
    
    $arPos = ControlGetPos($hWnd, "", $CtrlID)
    
    $x = $arPos[0]
    $y = $arPos[1] + $arPos[3]
    
    ClientToScreen($hWnd, $x, $y)
    TrackPopupMenu($hWnd, $hMenu, $x, $y)
EndFunc  ;==>ShowMenu


; Convert the client (GUI) coordinates to screen (desktop) coordinates
Func ClientToScreen($hWnd, ByRef $x, ByRef $y)
    Local $stPoint = DllStructCreate("int;int")
    
    DllStructSetData($stPoint, 1, $x)
    DllStructSetData($stPoint, 2, $y)

    DllCall("user32.dll", "int", "ClientToScreen", "hwnd", $hWnd, "ptr", DllStructGetPtr($stPoint))
    
    $x = DllStructGetData($stPoint, 1)
    $y = DllStructGetData($stPoint, 2)
; release Struct not really needed as it is a local
    $stPoint = 0
EndFunc  ;==>ClientToScreen


; Show at the given coordinates (x, y) the popup menu (hMenu) which belongs to a given GUI window (hWnd)
Func TrackPopupMenu($hWnd, $hMenu, $x, $y)
    DllCall("user32.dll", "int", "TrackPopupMenuEx", "hwnd", $hMenu, "int", 0, "int", $x, "int", $y, "hwnd", $hWnd, "ptr", 0)
EndFunc  ;==>TrackPopupMenu

; ----------------------------------------

Share this post


Link to post
Share on other sites
gseller

Hey, that is a really nice start to something.. Keep up the good work :)

Share this post


Link to post
Share on other sites
youknowwho4eva

No offense was meant, just can never be to weary, especially seeing I'm on a work computer :)

Edit: very interesting indeed. Nice work

Edited by youknowwho4eva

Giggity

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  

×