1
0
mirror of https://github.com/mastercodeon314/KsDumper-11.git synced 2024-09-24 03:08:22 +02:00
KsDumper-11/KsDumper11/TriggerForm.cs
2023-01-24 18:40:45 -06:00

62 lines
1.8 KiB
C#

using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Diagnostics;
using DarkControls;
namespace KsDumper11
{
public partial class TriggerForm : Form
{
protected override CreateParams CreateParams
{
get
{
// Activate double buffering at the form level. All child controls will be double buffered as well.
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000; // Turn on WS_EX_COMPOSITED
return cp;
}
}
public TriggerForm()
{
InitializeComponent();
//this.AcceptButton = acceptBtn;
this.appIcon1.DragForm = this;
this.FormClosing += TriggerForm_FormClosing;
this.Shown += TriggerForm_Shown;
this.FormBorderStyle = FormBorderStyle.None;
this.Region = Region.FromHrgn(Utils.CreateRoundRectRgn(0, 0, Width, Height, 10, 10));
this.closeBtn.Region = Region.FromHrgn(Utils.CreateRoundRectRgn(0, 0, closeBtn.Width, closeBtn.Height, 10, 10));
}
private void TriggerForm_Shown(object sender, EventArgs e)
{
//Debugger.Break();
}
private void TriggerForm_FormClosing(object sender, FormClosingEventArgs e)
{
this.DialogResult = DialogResult.OK;
}
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (m.Msg == Utils.WM_NCHITTEST)
m.Result = (IntPtr)(Utils.HT_CAPTION);
}
}
}