不规则形状 [英] Irregularly shaped forms

查看:173
本文介绍了不规则形状的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

许多现代应用都有不规则形状的形状。在Delphi中最好的方法是什么?是否可以这样做,而不使用任何第三方VCL?

解决方案

是可以的,你必须使用(使用位图图像)

  • 可以创建不同于标准矩形形状的形状在Windows中?(使用poligon)


  • Many modern applications have irregularly shaped forms. What is the best way to do this in Delphi? Is it possible to do this without using any third party VCLs?

    解决方案

    yes is possible, you must use the SetWindowRgn function to set the new window region to draw.

    try this code

    procedure TForm1.FormCreate(Sender: TObject);
    var
      region:HRGN;
    begin
      region := CreateRoundRectRgn(ClientRect.left, ClientRect.top, ClientRect.right, ClientRect.bottom, 15, 15);
      SetWindowRgn(Handle, region, true);
    end;
    

    check theses links for more info

    这篇关于不规则形状的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆