form of a window

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abdessamed1228
    New Member
    • Aug 2013
    • 3

    form of a window

    HI, o want my window looks like a circle, can you tell me what i will do; and thanks
  • aswal
    New Member
    • Aug 2013
    • 38

    #2
    - Open a image editing software like photoshop
    - Paint the sheet with a color [Suppose Red (255, 0 0 )]
    - Now Draw a circle over it (the color of circle must be different from the background color)
    - Now save the image with .png extension
    - Open your windows form
    - Select FormBorderStyle Property to none
    - Now select the backgroundImage which you have created
    - Select TransparencyKey property to the background color of the Image i.e Red (255, 0, 0)
    - Run the form

    Comment

    • vijay6
      New Member
      • Mar 2010
      • 158

      #3
      Hey abdessamed1228, copy and paste the following code in Form_Load event and try,

      Code:
      GraphicsPath path = new GraphicsPath();
      path.AddEllipse(0, 0, this.Width, this.Height);
      Region region = new Region(path);
      this.Region = region;

      Reference Link: How to create a non rectangular window form in c#?

      Comment

      • abdessamed1228
        New Member
        • Aug 2013
        • 3

        #4
        Originally posted by aswal
        - Open a image editing software like photoshop
        - Paint the sheet with a color [Suppose Red (255, 0 0 )]
        - Now Draw a circle over it (the color of circle must be different from the background color)
        - Now save the image with .png extension
        - Open your windows form
        - Select FormBorderStyle Property to none
        - Now select the backgroundImage which you have created
        - Select TransparencyKey property to the background color of the Image i.e Red (255, 0, 0)
        - Run the form
        thanks so much mate (y)

        Comment

        Working...