Sign in to follow this  
Followers 0
GeekS

Removing 'edges' from GUICtrlCreateButton

8 posts in this topic

#1 ·  Posted (edited)

$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

Share this post


Link to post
Share on other sites



Bump

Share this post


Link to post
Share on other sites

Bump

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I had that problem with the buttons before too. I used EzkinButton function and it got rid of that edge to the buttons.

http://www.autoitscript.com/forum/index.ph...9&hl=ezskin

hope that helps :P

Did help, but seems very distracting needing to use that command instead of just a standard au3 command :P.

Thanks anyways, Geeks.

Share this post


Link to post
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

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