Jump to content

Recommended Posts

  • Moderators
Posted

Keniger,

This is the only way I know how to remove the border - create a child GUI and put the button inside it: ;)

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

$hGUI = GUICreate("Test", 500, 500)
GUISetBkColor(0xFFCCCC)
GUISetState()

$hGUI_Button = GUICreate("", 80, 30, 10, 10, $WS_POPUP, $WS_EX_MDICHILD, $hGUI)

$cButton = GUICtrlCreateButton("Test", -1, -1, 82, 32) ; 2 pixels bigger than the GUI

GUISetState()

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $cButton
            MsgBox(0, "Hi", "Button pressed")
    EndSwitch

WEnd

I hope that helps. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

  • Moderators
Posted

Keniger,

The WEnd is there - you just cannot copy and paste! :P

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

Melba's "trick" also works when you want to place a button ontop of an image control.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

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
  • Recently Browsing   0 members

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