Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make a windows application that doesn't have a square form shape?

Tags:

c#

.net

winforms

I want to make an application that is similar to the World of warcraft launcher.

My main concern is to not have a square windows form with the typical close buttons, but a custom shape. How can I achieve this with C# and the .NET framework?

like image 732
Sergio Tapia Avatar asked Nov 05 '22 11:11

Sergio Tapia


2 Answers

Here's a tutorial on Creating Irregular Non-Rectangle Windows using WPF.

Consider this tutorial for creating Shaped Windows in WPF. It's got sample code in C#.

like image 145
p.campbell Avatar answered Nov 14 '22 02:11

p.campbell


There's a great piece of source code at http://www.codeproject.com/KB/GDI-plus/CsTranspTutorial3.aspx that allows you to make a form based off of any image with an alpha channel (like a .png), so that the transparent parts of the image correspond to places where you see through the form.

like image 34
Reinderien Avatar answered Nov 14 '22 01:11

Reinderien