Jump to content

Removing 'edges' from GUICtrlCreateButton


 Share

Recommended Posts

$Startattributes = GuiCtrlCreateButton ("Pancakes", x, y, x, y, $BS_BITMAP)
GUICtrlSetImage (-1, @WorkingDir&"\IMAGE.BMP")

It's a part of a longer code. I want this button/image to fade in with the background (Removing the edge/borders on the button). Any ideas of how that can be done?

$WS_EX_TRANSPARENT does NOT work.

Thanks in advance, Gnu / GeekS.

/EDIT

Another question:

Is it possible somehow to make a GUICreate without the Minimize/Maximize/Close buttons displayed? ($GUI_EVENT_CLOSE etc. removed)

Edited by GeekS
Link to comment
Share on other sites

Your answer to question #2.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 625, 445, 193, 125, BitOR($WS_CAPTION,$WS_POPUP,$WS_BORDER))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Link to comment
Share on other sites

Your answer to question #2.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 625, 445, 193, 125, BitOR($WS_CAPTION,$WS_POPUP,$WS_BORDER))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Exactly the way i wanted it, thanks! :P.

Now i just need some help with #1 question :P

Link to comment
Share on other sites

$Startattributes = GuiCtrlCreateButton ("Pancakes", x, y, x, y, $BS_BITMAP)
GUICtrlSetImage (-1, @WorkingDir&"\IMAGE.BMP")

It's a part of a longer code. I want this button/image to fade in with the background (Removing the edge/borders on the button). Any ideas of how that can be done?

$WS_EX_TRANSPARENT does NOT work.

Thanks in advance, Gnu / GeekS.

/EDIT

Another question:

Is it possible somehow to make a GUICreate without the Minimize/Maximize/Close buttons displayed? ($GUI_EVENT_CLOSE etc. removed)

Why not forget about the button and just make a Picture control? It will still react to clicks:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("TEST", 500,500, -1, -1, BitOR($WS_CAPTION, $WS_POPUP, $WS_BORDER))
$Startattributes = GUICtrlCreatePic(@WorkingDir & "\IMAGE.BMP", 5, 5, 40, 50)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Startattributes
            MsgBox(0, "", "You clicked the flat pic button")
    EndSwitch
    
WEnd
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...