Sign in to follow this  
Followers 0
vickerps

Background pic stopping combo box working

5 posts in this topic

I am creating a gui with a background image. However when i click on the combo box it doesn't drop down. if remove the GUICtrlCreatePic entry then the box is interactive. Can anyone help

#INCLUDE <Process.au3>
#INCLUDE <File.au3>
#INCLUDE <GUIConstants.au3>

dim $i

; Script Start - Add your code below here

Opt("GUICoordMode",1)
$F = GuiCreate("",1024,716,-1,-1,+$WS_SYSMENU,$WS_EX_TOPMOST)
    GUICtrlCreatePic ("winpe.bmp",0,0,@DesktopWidth,@DesktopHeight)

    GUICtrlCreateCombo("",10,10,180,40)
        $search = FileFindFirstFile("*.")
            While 1
            $file = FileFindNextFile($search) 
            IF $file = "" THEN EXITLOOP
            $i =  $i & $file & "|"
            WEnd
    GUICtrlSetData(-1,$i)


GUISetState(@SW_SHOW,$F)

WHILE 1
    $Msg=GUIGetMsg()
    
    SELECT 
        Case $msg = $GUI_EVENT_CLOSE 
            Exit
    
        EndSelect
WEnd

Share this post


Link to post
Share on other sites



I am creating a gui with a background image. However when i click on the combo box it doesn't drop down. if remove the GUICtrlCreatePic entry then the box is interactive. Can anyone help

#INCLUDE <Process.au3>
#INCLUDE <File.au3>
#INCLUDE <GUIConstants.au3>

dim $i

; Script Start - Add your code below here

Opt("GUICoordMode",1)
$F = GuiCreate("",1024,716,-1,-1,+$WS_SYSMENU,$WS_EX_TOPMOST)
    GUICtrlCreatePic ("winpe.bmp",0,0,@DesktopWidth,@DesktopHeight)

    GUICtrlCreateCombo("",10,10,180,40)
        $search = FileFindFirstFile("*.")
            While 1
            $file = FileFindNextFile($search) 
            IF $file = "" THEN EXITLOOP
            $i =  $i & $file & "|"
            WEnd
    GUICtrlSetData(-1,$i)


GUISetState(@SW_SHOW,$F)

WHILE 1
    $Msg=GUIGetMsg()
    
    SELECT 
        Case $msg = $GUI_EVENT_CLOSE 
            Exit
    
        EndSelect
WEnd

Just throw in a GUICtrlSetState() to disable the pic after creating it:

CODE

#INCLUDE <Process.au3>

#INCLUDE <File.au3>

#INCLUDE <GUIConstants.au3>

dim $i

; Script Start - Add your code below here

Opt("GUICoordMode",1)

$F = GuiCreate("",1024,716,-1,-1,+$WS_SYSMENU,$WS_EX_TOPMOST)

GUICtrlCreatePic ("winpe.bmp",0,0,@DesktopWidth,@DesktopHeight)

GUICtrlSetState(-1,$GUI_DISABLE)

GUICtrlCreateCombo("",10,10,180,40)

$search = FileFindFirstFile("*.")

While 1

$file = FileFindNextFile($search)

IF $file = "" THEN EXITLOOP

$i = $i & $file & "|"

WEnd

GUICtrlSetData(-1,$i)

GUISetState(@SW_SHOW,$F)

WHILE 1

$Msg=GUIGetMsg()

SELECT

Case $msg = $GUI_EVENT_CLOSE

Exit

EndSelect

WEnd


- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites

thankyou work a charm

Share this post


Link to post
Share on other sites

i think i have the same problem, i have a GUI with some options, and a Background picture, but the picture blocks/disabble's the buttons/radio's/ up/down

what can i change ?

i have this script:

#include <GuiConstants.au3>

$GuiHeight = 297
$GuiWidth = 125

; GUI
GuiCreate("Shutdown", $Guiwidth,$GuiHeight,-1,-1,$WS_OVERLAPPED)
GuiSetIcon(@SystemDir & "\power.ico", 0) 
GUISetBkColor(999999)
GUICtrlCreatePic (@SystemDir & "\bg.BMP", 0, 0, 125, 277)

; GROUP WITH RADIO BUTTONS
GuiCtrlCreateGroup("Options", 5, 5, 110, 120)
$shutdown = GuiCtrlCreateRadio("Shutdown", 15, 20, 80)
$standby = GuiCtrlCreateRadio("Standby", 15, 40, 80)
$logoff = GuiCtrlCreateRadio("Log off", 15, 60, 80)
$hibernate = GuiCtrlCreateRadio("Hibernate", 15, 80, 80)
$reboot = GuiCtrlCreateRadio("Reboot", 15, 100, 80)
GUICtrlCreateGroup ("",-99,-99,1,1) ;close group


;clock groupe
GuiCtrlCreateGroup("Timing", 5, 135, 110, 65)

; UPDOWN
GuiCtrlCreateLabel("Hours     Minutes", 20, 150)
$hours = GuiCtrlCreateInput("0", 20, 167, 40, 20)
GuiCtrlCreateUpDown(-1)
$minutes = GuiCtrlCreateInput("0", 65, 167, 40, 20)
GuiCtrlCreateUpDown(-1)

; BUTTON
$ok = GuiCtrlCreateButton("OK", 5, 210, 55, 30)
$cancel = GuiCtrlCreateButton("Cancel", 60, 210, 55, 30)
$minimize = GUICtrlCreateButton("Minimize", 5, 240, 110, 20)

; Variabler
$kommando = 0
$tid = 0

; GUI MESSAGE LOOP
GuiSetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop            
        Case $msg = $cancel
            ExitLoop
        Case $msg = $minimize
            GUISetState(@SW_MINIMIZE)
        Case $msg = $shutdown And BitAND(GUICtrlRead($shutdown), $GUI_CHECKED) = $GUI_CHECKED
            $kommando = 5        
        Case $msg = $standby And BitAND(GUICtrlRead($standby), $GUI_CHECKED) = $GUI_CHECKED
            $kommando = 32
        Case $msg = $logoff And BitAND(GUICtrlRead($logoff), $GUI_CHECKED) = $GUI_CHECKED
            $kommando = 4
        Case $msg = $hibernate And BitAND(GUICtrlRead($hibernate), $GUI_CHECKED) = $GUI_CHECKED
            $kommando = 64
        Case $msg = $reboot And BitAND(GUICtrlRead($reboot), $GUI_CHECKED) = $GUI_CHECKED
            $kommando = 6
        Case $msg = $ok 
            SplashTextOn("Prepare..", "Window will hide in 3 seconds. made by. puls and Jakob", 220, 45, 0, 0)
            sleep(1000)
            SplashOff()
            SplashTextOn("Prepare..", "Window will hide in 2 seconds. made by. puls and Jakob", 220, 45, 0, 0)
            sleep(1000)
            SplashOff()
            SplashTextOn("Prepare..", "Window will hide in 1 seconds. made by. puls and Jakob", 220, 45, 0, 0)
            sleep(1000)
            SplashOff()
            GUISetState(@SW_MINIMIZE)
            $tid = GUICtrlRead($hours) * 1000 * 60 * 60
            $tid = $tid + GUICtrlRead($minutes) * 1000 * 60
            sleep($tid)
            Shutdown($kommando)
                  
    EndSelect

WEnd

Share this post


Link to post
Share on other sites

Can't you see the answer in the 2nd post of this very thread?

Btw, GUICtrlCreatePic() reference in the helpfile has this answer too.


"be smart, drink your wine"

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