gpt4 book ai didi

c# - 如何隐藏窗体而不是关闭它

转载 作者:行者123 更新时间:2023-11-30 13:19:39 25 4
gpt4 key购买 nike

<分区>

尝试隐藏表单而不是关闭它,使用

    private void Playlist_FormClosed(object sender, FormClosedEventArgs e)
{
if (e.CloseReason == CloseReason.FormOwnerClosing) //if closed by aplication
{
this.Close();
}
if (e.CloseReason == CloseReason.UserClosing) //if closed by user
{
this.Hide();
}
}

但如果用户点击关闭,它仍然会关闭它。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com