所以即时创建在c#中的GUI,我将边界设置为无(为平面样式看) 和我注意到,在任何地方双击gui它最大化整个屏幕上的GUI甚至我禁用它的选项。禁用最大化双击
我试图改变选项,并增加了双击功能
private void Form1_DoubleClick(object sender, EventArgs e)
{
MessageBox.Show("no", "test");
}
双击图形用户界面的时候,这并不熄灭......我不知道在这一点上做的。
任何想法的人? 全码:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ScrapEX
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
MessageBox.Show("no", "test");
}
private void Form1_DoubleClick(object sender, EventArgs e)
{
MessageBox.Show("no", "test");
}
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case 0x84:
base.WndProc(ref m);
if ((int)m.Result == 0x1)
m.Result = (IntPtr)0x2;
return;
}
base.WndProc(ref m);
}
}
}
现在,我可以看到,香港专业教育学院一直在使用它来使窗口调整大小,我可以使它所以只有一个小区域作为标题栏?像右上角的三角形或什么?遗憾的混合问题,但是这是通过设置2
,或HTCAPTION
,有效地使你的整个形式充当标题栏相关
这个'WndProc'部分是什么?双击窗口标题具有这种行为。你在玩非客户区域还是什么? – Sinatr 2015-03-03 13:07:13
你可以尝试改变你的FormBorderStyle以外的无,像单身或其他东西。检查是否可以看到最大化按钮。 – 2015-03-03 13:45:40