Irregular shaped Windows Form (C#)

后端 未结 2 1178
一个人的身影
一个人的身影 2020-11-30 03:16

What is the easiest way to do this? Is it possible with managed code?

相关标签:
2条回答
  • 2020-11-30 03:56

    @Geoff shows the right way in winforms.

    But If you are planning to use WPF instead of Winforms then WPF(.NET3.0+) gives very flexible ways to create anyshape custom windows. Check out this article also http://www.codeproject.com/KB/WPF/wpfpopup.aspx

    0 讨论(0)
  • 2020-11-30 04:00
    this.BackgroundImage = //Image
    this.FormBorderStyle = FormBorderStyle.None;
    this.Width = this.BackgroundImage.Width;
    this.Height = this.BackgroundImage.Height;
    this.TransparencyKey = Color.FromArgb(0, 255, 0); //Contrast Color
    

    This allows you to create a form based on an image, and use transparency index to make it seem as though the form is not rectangular.

    0 讨论(0)
提交回复
热议问题