Jump to content

Visibily & Images


Recommended Posts

=How do I make a control less visibly without loosing the visibility in the rest of the window?

==Is there a way to put in image into the background of an Edit Box? (except method above?)(How to?)

===Can I make a "floating" control? as in, transparent background, and transparent window, (leaving only the control visible?) (How to?)

Thanks,

Thanks,

and Thanks!

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Link to comment
Share on other sites

=How do I make a control less visibly without loosing the visibility in the rest of the window?

Not sure if this will help, but an example of setting an input controls transparency while keeping the main gui solid..

#include <GUIConstants.au3>

$main = GUICreate('Transparency', 200, 55, -1, -1, -1, $WS_EX_TOPMOST)
$Slider = GuiCtrlCreateSlider(5, 30, 190, 20,$TBS_NOTICKS + $TBS_BOTH)
GUICtrlSetLimit($Slider, 255, 1)
GUICtrlSetData($Slider, 255)
GUISetState()

$Child = GUICreate('Input', 188, 18, -1, -1, $WS_POPUP, $WS_EX_TOPMOST, $main)
$Input = GUICtrlCreateInput('Use slider to set transparency', -1, -1, 190, 20)
GUISetState()

$old = GUICtrlRead($Slider)

While 1
    $wpm = WinGetPos($main)
    $x = $wpm[0] + 9
    $y = $wpm[1] + 35
    WinMove($Child, "", $x, $y)
    If GUICtrlRead($Slider) <> $old Then
        WinSetTrans($Child, "", GUICtrlRead($Slider))
        $old = GUICtrlRead($Slider)
    EndIf   
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd

Cheers

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...