aboutsummaryrefslogtreecommitdiff
path: root/Histacom2.Engine/Template/WinXP.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-10-23 16:49:06 -0400
committerlempamo <[email protected]>2017-10-23 16:49:06 -0400
commitfcab724a3d12bbd20dd123b96ac2596526057eec (patch)
tree7f6361ada1488ace1ab95d1655445916953d1c19 /Histacom2.Engine/Template/WinXP.cs
parent5e91513731ab83f356fd3cb4d2a13c93e933419a (diff)
downloadhistacom2-fcab724a3d12bbd20dd123b96ac2596526057eec.tar.gz
histacom2-fcab724a3d12bbd20dd123b96ac2596526057eec.tar.bz2
histacom2-fcab724a3d12bbd20dd123b96ac2596526057eec.zip
fix a few winxp template things
Diffstat (limited to 'Histacom2.Engine/Template/WinXP.cs')
-rw-r--r--Histacom2.Engine/Template/WinXP.cs45
1 files changed, 45 insertions, 0 deletions
diff --git a/Histacom2.Engine/Template/WinXP.cs b/Histacom2.Engine/Template/WinXP.cs
index cf6640b..fa26611 100644
--- a/Histacom2.Engine/Template/WinXP.cs
+++ b/Histacom2.Engine/Template/WinXP.cs
@@ -4,6 +4,7 @@ using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
+using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -19,6 +20,50 @@ namespace Histacom2.Engine.Template
DoubleBuffered = true;
}
+ public Font fnt;
+ public ResizeOverlay resizer = new ResizeOverlay();
+ public UserControl progContent;
+
+ public bool resizable = true;
+ public bool max = false;
+ public bool closeDisabled = false;
+ public bool isActive = true;
+ public bool Resizing = false;
+ public Bitmap ResizingBmp = null;
+ public const int WM_NCLBUTTONDOWN = 0xA1;
+ public const int WM_SYSCOMMAND = 0x0112;
+ public const int HT_CAPTION = 0x2;
+
+ private const int
+ HTLEFT = 10,
+ HTRIGHT = 11,
+ HTTOP = 12,
+ HTTOPLEFT = 13,
+ HTTOPRIGHT = 14,
+ HTBOTTOM = 15,
+ HTBOTTOMLEFT = 16,
+ HTBOTTOMRIGHT = 17;
+
+ private void closebutton_Click(object sender, EventArgs e)
+ {
+ if (!closeDisabled) this.Close();
+ }
+
+ private void top_MouseDown(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left && max == false)
+ {
+ ReleaseCapture();
+ SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
+ }
+ }
+
+ [DllImportAttribute("user32.dll")]
+ public static extern int SendMessage(IntPtr hWnd,
+ int Msg, int wParam, int lParam);
+ [DllImportAttribute("user32.dll")]
+ public static extern bool ReleaseCapture();
+
private void WinXP_Load(object sender, EventArgs e)
{