我想知道如何在 c#(Visual Studio) 中为带有圆角的文本框创建一个类。有人可以帮助我吗?我在网上找到了一个代码来创建它,但无法放大(拉伸)它
using System.Windows.Forms;
using System.Drawing;
using System;
class round : TextBox
{
[System.Runtime.InteropServices.DllImport("gdi32.dll", EntryPoint = "CreateRoundRectRgn")]
private static extern IntPtr CreateRoundRectRgn
(
int nLeftRect, // X-coordinate of upper-left corner or padding at start
int nTopRect,// Y-coordinate of upper-left corner or padding at the top of the textbox
int nRightRect, // X-coordinate of lower-right corner or Width of the object
int nBottomRect,// Y-coordinate of lower-right corner or Height of the object
//RADIUS, how round do you want it …Run Code Online (Sandbox Code Playgroud)