Click here to Skip to main content
Sign Up to vote bad
good
See more: VB.NET
Hi all
 
I want to make my login screen in different shape.means usually the forms are of rectangle shape but i want to change that shape..
 
Please give me some suggestion..
 
Thank you
Posted 5 Dec '12 - 20:38
Code-Hunt2.7K


2 solutions

follow steps,
 
just create desired shape in paint and fill with color,
leave the portion white you not want to show
save image
 
now
 
in winform set it as background image
and set TransparencyKey property = white
ControlBox = False
FormBorderStyle = None
 
run ...
 
note: this way can use images and set transparency color
 
Happy Coding!
Smile | :)
  Permalink  
Provided you don't need the title bar, or the system buttons, you can make any form (or any control) any shape you like by setting it's Region property:
            GraphicsPath path = new GraphicsPath();
            Rectangle rect = Rectangle(0, 0, 200, 200);;
            path.AddEllipse(rect);
            Region = new Region(path);
This sets the form to a small circle.
If you do this, you will be responsible for making sure that your controls are visible, you will need to do border effects yourself,and ensure there is some way for the user to close / minimize it.
  Permalink  
Comments
snehasish nandy - 6 Dec '12 - 6:21
where i have to put this piece of code..
OriginalGriff - 6 Dec '12 - 6:37
Constructor? Form Load event? Shown event? Up to you really! :laugh:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 484
1 Mahesh Bailwal 398
2 Maciej Los 215
3 CPallini 175
4 Aarti Meswania 173
0 Sergey Alexandrovich Kryukov 9,417
1 OriginalGriff 7,204
2 CPallini 3,933
3 Rohan Leuva 3,211
4 Maciej Los 2,743


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 6 Dec 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid