.net的winfrom程序 窗体透明&打开窗体时出现在屏幕右上角

窗体透明,

将Form的属性Opacity,由默认的100% 调整到 80%(尽量别低于50%),这个数字越小越透明!


打开窗体时出现在屏幕右上角

cs 复制代码
//构造函数
public frmCalendarList()
{
    InitializeComponent();

    //打开窗体,窗体出现在屏幕右上角
    this.StartPosition = FormStartPosition.Manual;//页面打开方式:默认(不要选CenterScreen之类)
    this.Left = Screen.PrimaryScreen.WorkingArea.Width - this.Width;//位置靠右
    this.Height = Screen.PrimaryScreen.WorkingArea.Height;//高度撑满屏幕高度
}

具体效果

相关推荐
2395730496 小时前
Avalonia 12 代码编辑器性能横评:TKCode.Arc CodeEditor vs AvaloniaEdit 12.0(含深度调优实战)
c#·.net·avalonia·codeeditor·tkcode.arc
MicrosoftReactor8 小时前
技术速递|Aspire 17 正式发布,已准备好投入生产使用
人工智能·ai·go·.net·agent·aspire
Jeff-Tsai2 天前
Polhem MD:用自己的 AI 模型读写 Markdown 的桌面编辑器
ai·.net·markdown·avalonia
Jeff-Tsai3 天前
Polhem.Chat:Avalonia 与 Blazor 的 AI 聊天组件
ai·.net·blazor·avalonia
Warson_L4 天前
.NET 8 速成笔记 1:用 VS Code 做 C# / .NET 开发
c#·.net
Warson_L4 天前
.NET 8 速成笔记 9:C# 项目常见场景(基础设施篇)
c#·.net
Warson_L4 天前
.NET 8 速成笔记 8:C# 项目常见业务场景与写法(数据与业务篇)
c#·.net