相关疑难解决方法(0)

UpdateLayeredWindow使用普通的canvas/textout

有没有办法在画布上绘制然后使用updatelayeredwindow,所以不会看到表单,但文本,如只显示文本的transculent表单?如果没有,那么有没有办法制作某种只有画布(opengl/directx)的变形形式?我想在所有窗口的顶部绘制命令.

delphi opengl directx winapi

4
推荐指数
1
解决办法
1418
查看次数

在 WinForm 应用程序中创建平滑的圆角

我想创建一个按钮和一个带圆角的容器。我正在使用区域来绘制角落,代码附在下面。然而,角落似乎并不平滑,有什么方法可以解决这个问题,任何帮助将不胜感激。下面附上图片,因为我还不允许上传图片。

在此处输入图片说明

[DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")]
        private static extern IntPtr CreateRoundRectRgn(
            int nLeftRect,
            int nTopRect,
            int nRightRect,
            int nBottomRect,
            int nWidthEllipse,
            int nHeightEllipse
            );
Run Code Online (Sandbox Code Playgroud)
  public Login()
        {
            InitializeComponent();
            this.Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 30, 30));
            this.logo.Image = Properties.Resources.logo;
            this.btn_login.Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, this.btn_login.Width, this.btn_login.Height, 10, 10));

        }

Run Code Online (Sandbox Code Playgroud)

.net c# winforms

0
推荐指数
1
解决办法
1980
查看次数

标签 统计

.net ×1

c# ×1

delphi ×1

directx ×1

opengl ×1

winapi ×1

winforms ×1