Thanks in advance!!!...I am using Curved Textbox for Username and Password..It is good for username but Password I need to show as * format....In this textbox property doesnot contain Passwordchar at all....Pls help...
What I have tried:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RoundTextBox
{
internal class MyRectangle
{
private Point Location;
private float radius;
private GraphicsPath gtpath;
private float x;
private float y;
private float width;
private float height;
public MyRectangle() { }
public MyRectangle(float width,float height,float radius,float x=0f,float y=0f)
{
this.Location = new Point(0, 0);
this.radius = radius;
this.x = x;
this.y = y;
this.height = height;
this.width = width;
this.gtpath = new GraphicsPath();
if(radius<=0f)
{
this.gtpath.AddRectangle(new RectangleF(x, y, width, height));
}
else
{
RectangleF ef = new RectangleF(x, y, 2f * radius, 2f * radius);
RectangleF ef2 = new RectangleF((width - (2f * radius))-1f ,x, 2f * radius, 2f * radius);
RectangleF ef3 = new RectangleF(x, (height - (2f * radius)) - 1f, 2f * radius, 2f * radius);
RectangleF ef4 = new RectangleF((width - (2f * radius)) - 1f, (height - (2f * radius)) - 1f, 2f * radius, 2f * radius);
this.gtpath.AddArc(ef, 180f, 90f);
this.gtpath.AddArc(ef2, 270f, 90f);
this.gtpath.AddArc(ef4, 0f, 90f);
this.gtpath.AddArc(ef3, 90f, 90f);
this.gtpath.CloseAllFigures();
}
}
public GraphicsPath path =>
this.gtpath;
public RectangleF rect =>
new RectangleF(this.x, this.y, this.width, this.height);
public float Radius
{
get => this.radius;
set =>
this.radius = value;
}
}
}