Sign in to follow this  
Followers 0
Rahul Rohela

Background Image setting Of GUI

4 posts in this topic

#1 ·  Posted (edited)

Hi,

i am trying to set background image on GUI. But after setting this i am not bale to view Tabs & setting is not proper... Please help to set image properly(on all controlls.. no default colour required)

#include <GUIConstants.au3>
#Include <GuiListView.au3>
#include <File.au3>
#Include <GuiListView.au3>
#include <Date.au3>


Global $List_SW, $ListTxt

$gui=GUICreate("Profile cleanar", 800, 500, -1, -1,BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU  ))
$background = GUICtrlCreatePic ("bglinks.jpg", 0, 0, 800, 500)
GUIctrlSetState($background,$GUI_DISABLE)
;******* File Menu ***********

$filemenu = GUICtrlCreateMenu ("&File")
$fileitem = GUICtrlCreateMenuitem ("Open PC List",$filemenu)
$exititem = GUICtrlCreateMenuitem ("Exit",$filemenu)
$filemenu2 = GUICtrlCreateMenu ("&Help")
$About = GUICtrlCreateMenuitem ("About",$filemenu2)
$filemenu3 = GUICtrlCreateMenu ("&Tools")
$Tool = GUICtrlCreateMenu ("Scan Mode",$filemenu3)
$Tool_Sub = GUICtrlCreateMenuitem ("Test Mode",$Tool)
$Tool_Sub2 = GUICtrlCreateMenuitem ("Clean Mode",$Tool)
$UserInfo = GUICtrlCreateMenuitem ("User Info",$filemenu3)
;**********TAB Creation*******
$Tab = GuiCtrlCreateTab (-1,-1,802,482,$WS_CLIPCHILDREN)
$TabPCList = GUICtrlCreateTabItem ( "Workstation Names" )

;******************Listview Workstation ******************
$List_SW = GUICtrlCreateListView("Workstations listed below will remotely be cleaned:", 2, 25, 396, 400, BitOR($LVS_SHOWSELALWAYS, $LVS_NOSORTHEADER))
GUICtrlSendMsg($List_SW, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT)
    _GUICtrlListViewSetColumnWidth ($List_SW, 0, 392)
;_GUICtrlListViewSetColumnWidth ($List_SW, 1, 120)
;_GUICtrlListViewHideColumn ($List_SW, 2)

$ButtonWS = GUICtrlCreateButton( "&Load", 5, 430,70, 40)
$ButtonWS1 = GUICtrlCreateButton( "&Save", 85, 430,70, 40)
$ButtonWS2 = GUICtrlCreateButton( "&Merge", 165, 430,70, 40)
$ButtonWS3 = GUICtrlCreateButton( "&Add", 245, 430,70, 40)
$ButtonWS5 = GUICtrlCreateButton( "&Remove", 325, 430,70, 40)

;********************ListView Profiles****************

$List_PR = GUICtrlCreateListView("Profiles listed below will NOT be removed from the remote workstation:", 400, 25, 396, 400, BitOR($LVS_SHOWSELALWAYS, $LVS_NOSORTHEADER))
GUICtrlSendMsg($List_SW, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT)
    _GUICtrlListViewSetColumnWidth ($List_PR, 0, 392)
$ButtonPR = GUICtrlCreateButton( "Lo&ad",403, 430,70, 40)
$ButtonPR1 = GUICtrlCreateButton( "Sa&ve", 483, 430,70, 40)
$ButtonPR2 = GUICtrlCreateButton( "M&erge", 563, 430,70, 40)
$ButtonPR3 = GUICtrlCreateButton( "A&dd", 643, 430,70, 40)
$ButtonPR5 = GUICtrlCreateButton( "Rem&ove", 723, 430,70, 40)

        GUICtrlCreateTabitem ("")

GUICtrlCreateTabItem ( "Configuration" )

$Lable_Confirg1 = GUICtrlCreateLabel("Drives and Folder", 5,45,140,20,$SS_BLACKFRAME);0x00112 )
$Lable_Confirg = GUICtrlCreateLabel("Drives and Folder", 5,45,140,20,$SS_CENTER)
GUICtrlSetFont ($Lable_Confirg,9, 800, 1)

;********************************Group1*************
GUICtrlCreateGroup("Group1",5,65,395,200,$WS_THICKFRAME)


$Lable_DriveW2K = GUICtrlCreateLabel("Temporarily map drive :", 12,85,130,20)

$Combo_drive = GUICtrlCreateCombo("Drive", 140,83,50,200);+0x00000100)
GUICtrlCreateLabel("(free drive letter on local computer)", 195,85,200,20)

$Lable_DriveNT = GUICtrlCreateLabel("system drive :", 12,185,130,20)

$Combo_SYSdrive = GUICtrlCreateCombo("Drive", 140,183,50,200);+0x00000100)
GUICtrlCreateLabel("(local drive )", 195,181,200,30)

;**********************************Group2************
GUICtrlCreateGroup("Group2",5,270,395,200,$WS_THICKFRAME)

$Lable_ProfileNT = GUICtrlCreateLabel("Path", 12,290,130,20)

$PathNT = GUICtrlCreateInput("\Folder\folder\", 130,288,150,20)
$DriveButton1 = GUICtrlCreateButton("....", 285,288,50,20,BitOr(0x0001,0x8000))

$Lable_ProfileW2K = GUICtrlCreateLabel("path", 12,390,130,20)
$PathW2K = GUICtrlCreateInput("\Path\Path\", 130,388,150,20)
$DriveButton1 = GUICtrlCreateButton("....", 285,388,50,20,BitOr(0x0001,0x8000))

;************************ Lable2 ********************
$Lable_Admin = GUICtrlCreateLabel("Account & Rules", 400,45,140,20,$SS_BLACKFRAME);0x00112 )
$Lable_Admin1 = GUICtrlCreateLabel("Account and Rules", 400,45,140,20,$SS_CENTER)
GUICtrlSetFont ($Lable_Admin1,9, 800, 1)

;******************Group3*******************************
GUICtrlCreateGroup("Account:",400,65,395,200,$WS_THICKFRAME)
$Lable_UserName = GUICtrlCreateLabel("Administrator UserName :", 407,85,130,20)
$UserName = GUICtrlCreateInput("", 550,83,180,20)

$Lable_Password = GUICtrlCreateLabel("Administrator Password :", 407,185,130,20)
$Password = GUICtrlCreateInput("", 550,183,180,20,$ES_PASSWORD)

;*******************Group4**********************
GUICtrlCreateGroup("Rules :",400,270,395,200,$WS_THICKFRAME)
$ProfileBox1 = GUICtrlCreateCheckbox ("day list",407,290,260,20)
$ProfileDay = GUICtrlCreateInput("10", 680,288,50,20)
$upDown = GUICtrlCreateUpdown ( $ProfileDay,$UDS_ARROWKEYS+$UDS_WRAP)
GUICtrlSetLimit ( $upDown, 999, 2 )
    GUICtrlCreateLabel("Days.", 740,290,30,20)
;***********************Sub Group*************************
GUICtrlCreateGroup("Settings", 407,320,381,143)
    GUICtrlCreateLabel ("Folder :",412,350,80,20)
$LOGFile = GUICtrlCreateInput(@ScriptDir, 490,348,270,20)
$DriveButton1 = GUICtrlCreateButton("....", 763,348,20,20,BitOr(0x0001,0x8000))
    GUICtrlCreateLabel ("Save :",412,390,35,20)
$SaveOpt = GUICtrlCreateCombo("", 450,388,120,200)
GUICtrlSetData($SaveOpt,"Always|Only if error occure","Always") 
    GUICtrlCreateLabel ("FileName :",580,390,50,20)
$LOGFileName = GUICtrlCreateInput("", 638,388,120,20)

GUICtrlCreateTabitem ("")
;******** Edit Menu *******
GUICtrlCreateTabItem ( "Edit" )
$DisplayWindow = GUICtrlCreateEdit ("", 2,25,794,450,$ES_AUTOVSCROLL+$WS_VSCROLL);+$ES_READONLY)

GUICtrlCreateTabitem ("")

GUISetState(@SW_SHOW,$gui)


;***************************************************************************************************
****
While 1
    $msg = GUIGetMsg()


    If $msg = $GUI_EVENT_CLOSE Then ExitLoop


Wend

;***************************************************************************************************
**********

Image file attached..

Edited by Rahul Rohela

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

12th July, 2006 - v3.1.1.130 (beta)

Added : Check to ensure that FileInstall() can override the target file. (Thanks ..., fixed by JdeB)

Added : GUICtrlCreatePic doc precision when using overlayed tab control. (Thanks Holger)

Even beta 130 is not helping.. Please help.. where i am doing wrong...

Edited by Rahul Rohela

Share this post


Link to post
Share on other sites

Near on...

#include <GUIConstants.au3>
#Include <GuiListView.au3>
#include <File.au3>
#Include <GuiListView.au3>
#include <Date.au3>


Global $List_SW, $ListTxt
Dim $backpic = @ScriptDir & "\bglinks.jpg"

$gui=GUICreate("Profile cleanar", 800, 500, -1, -1,BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU  ))

;******* File Menu ***********
$filemenu   = GUICtrlCreateMenu ("&File")
$fileitem   = GUICtrlCreateMenuitem ("Open PC List",$filemenu)
$exititem   = GUICtrlCreateMenuitem ("Exit",$filemenu)
$filemenu2  = GUICtrlCreateMenu ("&Help")
$About      = GUICtrlCreateMenuitem ("About",$filemenu2)
$filemenu3  = GUICtrlCreateMenu ("&Tools")
$Tool       = GUICtrlCreateMenu ("Scan Mode",$filemenu3)
$Tool_Sub   = GUICtrlCreateMenuitem ("Test Mode",$Tool)
$Tool_Sub2  = GUICtrlCreateMenuitem ("Clean Mode",$Tool)
$UserInfo   = GUICtrlCreateMenuitem ("User Info",$filemenu3)

;**********TAB Creation*******
$Tab        = GuiCtrlCreateTab (0, 0, 802, 480)
GUICtrlSetResizing(-1, $GUI_DOCKBORDERS)
;GUICtrlSetState(-1, $GUI_ONTOP)
$TabPCList  = GUICtrlCreateTabItem ( "Workstation Names" )
GUICtrlCreatePic ($backpic, 0, 23, 800, 480)
GUICtrlSetResizing(-1, $GUI_DOCKBORDERS)
GUIctrlSetState(-1,$GUI_DISABLE)

;******************Listview Workstation ******************
$List_SW    = GUICtrlCreateListView("Workstations listed below will remotely be cleaned:", 2, 25, 396, 400, BitOR($LVS_SHOWSELALWAYS, $LVS_NOSORTHEADER))
GUICtrlSendMsg($List_SW, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT)
    _GUICtrlListViewSetColumnWidth ($List_SW, 0, 392)
;_GUICtrlListViewSetColumnWidth ($List_SW, 1, 120)
;_GUICtrlListViewHideColumn ($List_SW, 2)

$ButtonWS   = GUICtrlCreateButton( "&Load", 5, 430, 70, 40)
$ButtonWS1  = GUICtrlCreateButton( "&Save", 85, 430, 70, 40)
$ButtonWS2  = GUICtrlCreateButton( "&Merge", 165, 430, 70, 40)
$ButtonWS3  = GUICtrlCreateButton( "&Add", 245, 430, 70, 40)
$ButtonWS5  = GUICtrlCreateButton( "&Remove", 325, 430, 70, 40)

;********************ListView Profiles****************

$List_PR = GUICtrlCreateListView("Profiles listed below will NOT be removed from the remote workstation:", 400, 25, 396, 400, BitOR($LVS_SHOWSELALWAYS, $LVS_NOSORTHEADER))
GUICtrlSendMsg($List_SW, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT)
    _GUICtrlListViewSetColumnWidth ($List_PR, 0, 392)
$ButtonPR   = GUICtrlCreateButton( "Lo&ad",403, 430, 70, 40)
$ButtonPR1  = GUICtrlCreateButton( "Sa&ve", 483, 430, 70, 40)
$ButtonPR2  = GUICtrlCreateButton( "M&erge", 563, 430, 70, 40)
$ButtonPR3  = GUICtrlCreateButton( "A&dd", 643, 430, 70, 40)
$ButtonPR5  = GUICtrlCreateButton( "Rem&ove", 723, 430, 70, 40)


GUICtrlCreateTabItem ( "Configuration" )
GUICtrlCreatePic ($backpic, 0, 23, 800, 480)
GUICtrlSetResizing(-1, $GUI_DOCKBORDERS)
GUIctrlSetState(-1,$GUI_DISABLE)

$Lable_Confirg1     = GUICtrlCreateLabel("Drives and Folder", 5, 45, 140, 20, $SS_BLACKFRAME);0x00112 )
$Lable_Confirg      = GUICtrlCreateLabel("Drives and Folder", 5, 45, 140, 20, $SS_CENTER)
GUICtrlSetFont ($Lable_Confirg, 9, 800, 1)

;********************************Group1*************
GUICtrlCreateGroup("Group1",5,65,395,200,$WS_THICKFRAME)


$Lable_DriveW2K     = GUICtrlCreateLabel("Temporarily map drive :", 12, 85, 130, 20)

$Combo_drive        = GUICtrlCreateCombo("Drive", 140, 83, 50, 200);+0x00000100)
GUICtrlCreateLabel("(free drive letter on local computer)", 195, 85, 200, 20)

$Lable_DriveNT      = GUICtrlCreateLabel("system drive :", 12, 185, 130, 20)

$Combo_SYSdrive     = GUICtrlCreateCombo("Drive", 140, 183, 50, 200);+0x00000100)
GUICtrlCreateLabel("(local drive )", 195, 181, 200, 30)

;**********************************Group2************
GUICtrlCreateGroup("Group2", 5, 270, 395, 200, $WS_THICKFRAME)

$Lable_ProfileNT    = GUICtrlCreateLabel("Path", 12, 290, 130, 20)

$PathNT             = GUICtrlCreateInput("\Folder\folder\", 130, 288, 150, 20)
$DriveButton1       = GUICtrlCreateButton("....", 285, 288, 50, 20, BitOr(0x0001, 0x8000))

$Lable_ProfileW2K   = GUICtrlCreateLabel("path", 12, 390, 130, 20)
$PathW2K            = GUICtrlCreateInput("\Path\Path\", 130, 388, 150, 20)
$DriveButton1       = GUICtrlCreateButton("....", 285, 388, 50, 20, BitOr(0x0001, 0x8000))

;************************ Lable2 ********************
$Lable_Admin        = GUICtrlCreateLabel("Account & Rules", 400, 45, 140, 20, $SS_BLACKFRAME);0x00112 )
$Lable_Admin1       = GUICtrlCreateLabel("Account and Rules", 400, 45, 140, 20, $SS_CENTER)
GUICtrlSetFont ($Lable_Admin1, 9, 800, 1)

;******************Group3*******************************
GUICtrlCreateGroup("Account:",400,65,395,200,$WS_THICKFRAME)
$Lable_UserName     = GUICtrlCreateLabel("Administrator UserName :", 407, 85, 130, 20)
$UserName           = GUICtrlCreateInput("", 550, 83, 180, 20)

$Lable_Password     = GUICtrlCreateLabel("Administrator Password :", 407, 185, 130, 20)
$Password           = GUICtrlCreateInput("", 550, 183, 180, 20, $ES_PASSWORD)

;*******************Group4**********************
GUICtrlCreateGroup("Rules :", 400, 270, 395, 200, $WS_THICKFRAME)
$ProfileBox1        = GUICtrlCreateCheckbox ("day list", 407, 290, 260, 20)
$ProfileDay         = GUICtrlCreateInput("10", 680, 288, 50, 20)
$upDown             = GUICtrlCreateUpdown ( $ProfileDay, BitOr($UDS_ARROWKEYS, $UDS_WRAP))
GUICtrlSetLimit ( $upDown, 999, 2 )
GUICtrlCreateLabel("Days.", 740, 290, 30, 20)

;***********************Sub Group*************************
GUICtrlCreateGroup("Settings", 407, 320, 381, 143)
    GUICtrlCreateLabel ("Folder :", 412, 350, 80, 20)
$LOGFile            = GUICtrlCreateInput(@ScriptDir, 490, 348, 270, 20)
$DriveButton1       = GUICtrlCreateButton("....", 763, 348, 20, 20, BitOr(0x0001, 0x8000))
GUICtrlCreateLabel ("Save :",412,390,35,20)
$SaveOpt            = GUICtrlCreateCombo("", 450, 388, 120, 200)
GUICtrlSetData($SaveOpt,"Always|Only if error occure","Always") 
GUICtrlCreateLabel ("FileName :", 580, 390, 50, 20)
$LOGFileName        = GUICtrlCreateInput("", 638, 388, 120, 20)


GUICtrlCreateTabItem ( "Edit" )
GUICtrlCreatePic ($backpic, 0, 23, 800, 480)
GUICtrlSetResizing(-1, $GUI_DOCKBORDERS)
GUIctrlSetState(-1,$GUI_DISABLE)

$DisplayWindow      = GUICtrlCreateEdit ("", 2, 25, 794, 450, BitOr($ES_AUTOVSCROLL, $WS_VSCROLL));+$ES_READONLY)

GUICtrlCreateTabitem ("")

GUISetState(@SW_SHOW, $gui)


;*******************************************************************************************************
While 1
    $msg = GUIGetMsg()


    If $msg = $GUI_EVENT_CLOSE Then ExitLoop


Wend

;*************************************************************************************************************

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thx its working... :D

Edited by Rahul Rohela

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