delphi - 没有点击的部分透明表单?
问题描述
在 Windows 10 中的 Delphi 10.4.2 win-32 VCL 应用程序中,我使用此表单代码使表单部分透明:
object Form1: TForm1
Left = 0
Top = 0
BorderStyle = bsNone
Caption = 'Form1'
ClientHeight = 378
ClientWidth = 589
Color = clRed
TransparentColor = True
TransparentColorValue = clGreen
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
FormStyle = fsStayOnTop
OldCreateOrder = False
Position = poDefault
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object Panel1: TPanel
AlignWithMargins = True
Left = 3
Top = 3
Width = 583
Height = 372
Align = alClient
BevelOuter = bvNone
Color = clGreen
ParentBackground = False
TabOrder = 0
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 589
ExplicitHeight = 378
end
end
这具有在框架内显示具有透明区域的红色框架的效果:
不幸的是,透明区域也有一个 CLICK-THROUGH “功能”,这是我不想要的:透明区域应该只透明且可点击而不是点击,所以当我点击透明区域时,我应该点击- 来自小组的事件。
那么如何禁用透明区域的点击功能呢?
解决方案
推荐阅读
- kubernetes - eksctl create failed 一个子网没有足够的容量来支持集群
- java - 需要帮助理解,java:
预期在下面的代码中 - python - Discord Bot - 如何删除倒数第二条最近的消息?
- reactjs - 是否可以从 graphQL 中的突变完成回调中检索有效负载?
- c++ - 错误:'operator=' 不匹配(操作数类型为 'const XXX' 和 'std::remove_reference
::type' {aka 'const XXX'}) - ios - SwiftUI:导航返回时如何平滑过渡bottomBar工具栏?
- npm - Npm 包没有更新
- django - 如何从 Django 中的 OneToOneField 填充模型的新字段?
- css - 使用小部件更改 Django 表单中标签的 CSS
- python - Flask-Security,多语言页面的动态 url 前缀(使用 Flask-Babelex)