willichan Posted November 15, 2014 Share Posted November 15, 2014 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? My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
Solution ahmet Posted November 15, 2014 Solution Share Posted November 15, 2014 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) $hRgnMain=_WinAPI_CreateRectRgn(0,0,0,0) $hRgns[0]=_WinAPI_CreateRectRgn(0,200,400,400) $hrgns[1]=_WinAPI_CreateRoundRectRgn(0,0,400,400,20,20) GUISetBkColor(0x0000EE) _WinAPI_CombineRgn($hRgnMain,$hRgns[0],$hRgns[1],$RGN_OR) _WinAPI_SetWindowRgn($hMain,$hRgnMain) GUISetState() While 1 $msg=GUIGetMsg() If $msg=$GUI_EVENT_CLOSE Then ExitLoop Wend For $i=0 To UBound($hRgns)-1 _WinAPI_DeleteObject($hRgns[$i]) Next _WinAPI_DeleteObject($hRgnMain) You can also create GDIPlusPath (create lines and arcs), then convert it to GDIPlusRegion, and then that to GDIRegion Link to comment Share on other sites More sharing options...
willichan Posted November 15, 2014 Author Share Posted November 15, 2014 That definately puts me on track. Thank you. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
ahmet Posted November 15, 2014 Share Posted November 15, 2014 You are welcome Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now