Como posso arredondar apenas as bordas do Form?
Eu gostaria de deixar apenas as extremidades do form arredondadas!
Como do formulario do windows XP!, porem no windows 98.
Como do formulario do windows XP!, porem no windows 98.
Jj_malka
Curtidas 0
Respostas
Nanokaso Gongon
30/11/2003
Olha em Delphi eu nao sei .. mas em c# fica assim:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace teste
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void ArredondaCantosdoForm()
{
GraphicsPath PastaGrafica = new GraphicsPath();
PastaGrafica.AddRectangle(new System.Drawing.Rectangle(1, 1, this.Size.Width, this.Size.Height));
//Arredondar canto superior esquerdo
PastaGrafica.AddRectangle(new System.Drawing.Rectangle(1, 1, 10, 10));
PastaGrafica.AddPie(1, 1, 20, 20, 180, 90);
//Arredondar canto superior direito
PastaGrafica.AddRectangle(new System.Drawing.Rectangle(this.Width - 12, 1, 12, 13));
PastaGrafica.AddPie(this.Width - 24, 1, 24, 26, 270, 90);
//Arredondar canto inferior esquerdo
PastaGrafica.AddRectangle(new System.Drawing.Rectangle(1, this.Height - 10, 10, 10));
PastaGrafica.AddPie(1, this.Height - 20, 20, 20, 90, 90);
//Arredondar canto inferior direito
PastaGrafica.AddRectangle(new System.Drawing.Rectangle(this.Width - 12, this.Height - 13, 13, 13));
PastaGrafica.AddPie(this.Width - 24, this.Height - 26, 24, 26, 0, 90);
PastaGrafica.SetMarkers();
this.Region = new Region(PastaGrafica);
}
private void Form1_Load(object sender, EventArgs e)
{
ArredondaCantosdoForm();
}
}
}
GOSTEI 0
Raylan Zibel
30/11/2003
Atualize o Sistema Operacional.
GOSTEI 0