Jump to content

Only round top corners

Go to solution Solved by ahmet,

Recommended Posts

I don't know why he wants it, but I had someone ask me if I could modify a script I did for him to have the top corners rounded, but not the bottom.  I have seen a few code examples for making all of the corners of a GUI rounded, but, not for just rounding specified corners.

Is that even possible?  I already told they guy that I didn't know how to do that, and he is fine with it, but now that little voice in the back of my head keeps wanting it figured out.

Anyone have any ideas?

Link to post
Share on other sites
  • Solution

Not perfect, but something like this

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

Global $hMain, $hRgns[2], $hRgnMain
$hMain=GUICreate("Only upper rounded",400,400,Default,Default,$WS_POPUP)




While 1
    If $msg=$GUI_EVENT_CLOSE Then ExitLoop

For $i=0 To UBound($hRgns)-1

You can also create GDIPlusPath (create lines and arcs), then convert it to GDIPlusRegion, and then that to GDIRegion

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

    No registered users viewing this page.

  • Create New...