ソースを参照

新建自定义窗体(带标题及最小化最大化等按钮)

yuzhengyang 8 年 前
コミット
274d712857

+ 26 - 26
Fork.Net/Test/CustomWindow/Forms/SimpleTitleForm.Designer.cs

@@ -31,15 +31,15 @@
             this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.label1 = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
-            this.panel2 = new System.Windows.Forms.Panel();
-            this.panel3 = new System.Windows.Forms.Panel();
             this.panel4 = new System.Windows.Forms.Panel();
+            this.panel3 = new System.Windows.Forms.Panel();
             this.BTClose = new System.Windows.Forms.Button();
+            this.panel2 = new System.Windows.Forms.Panel();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.panel1.SuspendLayout();
-            this.panel2.SuspendLayout();
-            this.panel3.SuspendLayout();
             this.panel4.SuspendLayout();
+            this.panel3.SuspendLayout();
+            this.panel2.SuspendLayout();
             this.SuspendLayout();
             // 
             // pictureBox1
@@ -58,7 +58,7 @@
             this.label1.Location = new System.Drawing.Point(0, 0);
             this.label1.Name = "label1";
             this.label1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
-            this.label1.Size = new System.Drawing.Size(1783, 56);
+            this.label1.Size = new System.Drawing.Size(1233, 56);
             this.label1.TabIndex = 1;
             this.label1.Text = "label1";
             this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -73,36 +73,27 @@
             this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel1.Location = new System.Drawing.Point(0, 0);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(1920, 56);
+            this.panel1.Size = new System.Drawing.Size(1370, 56);
             this.panel1.TabIndex = 2;
             // 
-            // panel2
+            // panel4
             // 
-            this.panel2.Controls.Add(this.pictureBox1);
-            this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
-            this.panel2.Location = new System.Drawing.Point(0, 0);
-            this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(56, 56);
-            this.panel2.TabIndex = 0;
+            this.panel4.Controls.Add(this.label1);
+            this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.panel4.Location = new System.Drawing.Point(56, 0);
+            this.panel4.Name = "panel4";
+            this.panel4.Size = new System.Drawing.Size(1233, 56);
+            this.panel4.TabIndex = 3;
             // 
             // panel3
             // 
             this.panel3.Controls.Add(this.BTClose);
             this.panel3.Dock = System.Windows.Forms.DockStyle.Right;
-            this.panel3.Location = new System.Drawing.Point(1839, 0);
+            this.panel3.Location = new System.Drawing.Point(1289, 0);
             this.panel3.Name = "panel3";
             this.panel3.Size = new System.Drawing.Size(81, 56);
             this.panel3.TabIndex = 2;
             // 
-            // panel4
-            // 
-            this.panel4.Controls.Add(this.label1);
-            this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.panel4.Location = new System.Drawing.Point(56, 0);
-            this.panel4.Name = "panel4";
-            this.panel4.Size = new System.Drawing.Size(1783, 56);
-            this.panel4.TabIndex = 3;
-            // 
             // BTClose
             // 
             this.BTClose.Location = new System.Drawing.Point(3, 12);
@@ -113,11 +104,20 @@
             this.BTClose.UseVisualStyleBackColor = true;
             this.BTClose.Click += new System.EventHandler(this.BTClose_Click);
             // 
+            // panel2
+            // 
+            this.panel2.Controls.Add(this.pictureBox1);
+            this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
+            this.panel2.Location = new System.Drawing.Point(0, 0);
+            this.panel2.Name = "panel2";
+            this.panel2.Size = new System.Drawing.Size(56, 56);
+            this.panel2.TabIndex = 0;
+            // 
             // SimpleTitleForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1920, 1080);
+            this.ClientSize = new System.Drawing.Size(1370, 772);
             this.Controls.Add(this.panel1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Name = "SimpleTitleForm";
@@ -125,9 +125,9 @@
             this.Load += new System.EventHandler(this.NoTitleForm_Load);
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             this.panel1.ResumeLayout(false);
-            this.panel2.ResumeLayout(false);
-            this.panel3.ResumeLayout(false);
             this.panel4.ResumeLayout(false);
+            this.panel3.ResumeLayout(false);
+            this.panel2.ResumeLayout(false);
             this.ResumeLayout(false);
 
         }

+ 1 - 1
Fork.Net/Test/Y.Test/Program.cs

@@ -17,7 +17,7 @@ namespace Y.Test
         {
             Application.EnableVisualStyles();
             Application.SetCompatibleTextRenderingDefault(false);
-            Application.Run(new TestComputerInfoForm());
+            Application.Run(new TestSimpleTitle());
         }
     }
 }

+ 47 - 0
Fork.Net/Test/Y.Test/Views/TestSimpleTitle.Designer.cs

@@ -0,0 +1,47 @@
+namespace Y.Test.Views
+{
+    partial class TestSimpleTitle
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.SuspendLayout();
+            // 
+            // TestSimpleTitle
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(593, 481);
+            this.Name = "TestSimpleTitle";
+            this.Text = "Hello";
+            this.Load += new System.EventHandler(this.TestSimpleTitle_Load);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+    }
+}

+ 26 - 0
Fork.Net/Test/Y.Test/Views/TestSimpleTitle.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using Y.Skin.YoForm.CustomTitle;
+using Y.Skin.YoForm.NoTitle;
+
+namespace Y.Test.Views
+{
+    public partial class TestSimpleTitle : DarkTitleForm
+    {
+        public TestSimpleTitle()
+        {
+            InitializeComponent();
+        }
+
+        private void TestSimpleTitle_Load(object sender, EventArgs e)
+        {
+
+        }
+    }
+}

+ 120 - 0
Fork.Net/Test/Y.Test/Views/TestSimpleTitle.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 9 - 0
Fork.Net/Test/Y.Test/Y.Test.csproj

@@ -122,6 +122,12 @@
     <Compile Include="Views\TestMove.Designer.cs">
       <DependentUpon>TestMove.cs</DependentUpon>
     </Compile>
+    <Compile Include="Views\TestSimpleTitle.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Views\TestSimpleTitle.Designer.cs">
+      <DependentUpon>TestSimpleTitle.cs</DependentUpon>
+    </Compile>
     <Compile Include="Views\TestWebForm.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -156,6 +162,9 @@
     <EmbeddedResource Include="Views\TestMove.resx">
       <DependentUpon>TestMove.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Views\TestSimpleTitle.resx">
+      <DependentUpon>TestSimpleTitle.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Views\TestWebForm.resx">
       <DependentUpon>TestWebForm.cs</DependentUpon>
     </EmbeddedResource>

+ 21 - 0
Fork.Net/Y.Skin/Y.Skin.csproj

@@ -49,6 +49,18 @@
     <Compile Include="YoButton\ImageButton.Designer.cs">
       <DependentUpon>ImageButton.cs</DependentUpon>
     </Compile>
+    <Compile Include="YoForm\CustomTitle\DarkTitleHorizontalForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="YoForm\CustomTitle\DarkTitleHorizontalForm.Designer.cs">
+      <DependentUpon>DarkTitleHorizontalForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="YoForm\CustomTitle\DarkTitleVerticalForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="YoForm\CustomTitle\DarkTitleVerticalForm.Designer.cs">
+      <DependentUpon>DarkTitleVerticalForm.cs</DependentUpon>
+    </Compile>
     <Compile Include="YoForm\Irregular\IrregularForm.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -61,6 +73,12 @@
     <Compile Include="YoForm\Irregular\IrregularFormSkin.Designer.cs">
       <DependentUpon>IrregularFormSkin.cs</DependentUpon>
     </Compile>
+    <Compile Include="YoForm\CustomTitle\DarkTitleForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="YoForm\CustomTitle\DarkTitleForm.Designer.cs">
+      <DependentUpon>DarkTitleForm.cs</DependentUpon>
+    </Compile>
     <Compile Include="YoForm\NoTitle\NoTitleForm.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -109,6 +127,9 @@
     <EmbeddedResource Include="YoForm\Irregular\IrregularFormSkin.resx">
       <DependentUpon>IrregularFormSkin.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="YoForm\CustomTitle\DarkTitleForm.resx">
+      <DependentUpon>DarkTitleForm.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="YoForm\NoTitle\NoTitleForm.resx">
       <DependentUpon>NoTitleForm.cs</DependentUpon>
     </EmbeddedResource>

+ 182 - 0
Fork.Net/Y.Skin/YoForm/CustomTitle/DarkTitleForm.Designer.cs

@@ -0,0 +1,182 @@
+namespace Y.Skin.YoForm.CustomTitle
+{
+    partial class DarkTitleForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.PNHead = new System.Windows.Forms.Panel();
+            this.PNHeadTitle = new System.Windows.Forms.Panel();
+            this.LBHeadTitle = new System.Windows.Forms.Label();
+            this.PNHeadButton = new System.Windows.Forms.Panel();
+            this.BTFormMinBox = new System.Windows.Forms.Button();
+            this.BTFormMaxBox = new System.Windows.Forms.Button();
+            this.BTFormCloseBox = new System.Windows.Forms.Button();
+            this.PNHeadIcon = new System.Windows.Forms.Panel();
+            this.PBHeadIcon = new System.Windows.Forms.PictureBox();
+            this.PNHead.SuspendLayout();
+            this.PNHeadTitle.SuspendLayout();
+            this.PNHeadButton.SuspendLayout();
+            this.PNHeadIcon.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.PBHeadIcon)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // PNHead
+            // 
+            this.PNHead.Controls.Add(this.PNHeadTitle);
+            this.PNHead.Controls.Add(this.PNHeadButton);
+            this.PNHead.Controls.Add(this.PNHeadIcon);
+            this.PNHead.Dock = System.Windows.Forms.DockStyle.Top;
+            this.PNHead.Location = new System.Drawing.Point(0, 0);
+            this.PNHead.Name = "PNHead";
+            this.PNHead.Size = new System.Drawing.Size(1370, 52);
+            this.PNHead.TabIndex = 4;
+            // 
+            // PNHeadTitle
+            // 
+            this.PNHeadTitle.Controls.Add(this.LBHeadTitle);
+            this.PNHeadTitle.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.PNHeadTitle.Location = new System.Drawing.Point(52, 0);
+            this.PNHeadTitle.Name = "PNHeadTitle";
+            this.PNHeadTitle.Size = new System.Drawing.Size(1201, 52);
+            this.PNHeadTitle.TabIndex = 7;
+            // 
+            // LBHeadTitle
+            // 
+            this.LBHeadTitle.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.LBHeadTitle.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LBHeadTitle.ForeColor = System.Drawing.Color.White;
+            this.LBHeadTitle.Location = new System.Drawing.Point(0, 0);
+            this.LBHeadTitle.Name = "LBHeadTitle";
+            this.LBHeadTitle.Size = new System.Drawing.Size(1201, 52);
+            this.LBHeadTitle.TabIndex = 0;
+            this.LBHeadTitle.Text = "DarkTitleForm";
+            this.LBHeadTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.LBHeadTitle.MouseMove += new System.Windows.Forms.MouseEventHandler(this.LBHeadTitle_MouseMove);
+            // 
+            // PNHeadButton
+            // 
+            this.PNHeadButton.Controls.Add(this.BTFormMinBox);
+            this.PNHeadButton.Controls.Add(this.BTFormMaxBox);
+            this.PNHeadButton.Controls.Add(this.BTFormCloseBox);
+            this.PNHeadButton.Dock = System.Windows.Forms.DockStyle.Right;
+            this.PNHeadButton.Location = new System.Drawing.Point(1253, 0);
+            this.PNHeadButton.Name = "PNHeadButton";
+            this.PNHeadButton.Size = new System.Drawing.Size(117, 52);
+            this.PNHeadButton.TabIndex = 6;
+            // 
+            // BTFormMinBox
+            // 
+            this.BTFormMinBox.FlatAppearance.BorderSize = 0;
+            this.BTFormMinBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.BTFormMinBox.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.BTFormMinBox.ForeColor = System.Drawing.Color.White;
+            this.BTFormMinBox.Location = new System.Drawing.Point(6, 7);
+            this.BTFormMinBox.Name = "BTFormMinBox";
+            this.BTFormMinBox.Size = new System.Drawing.Size(32, 26);
+            this.BTFormMinBox.TabIndex = 2;
+            this.BTFormMinBox.Text = "-";
+            this.BTFormMinBox.UseVisualStyleBackColor = true;
+            this.BTFormMinBox.Click += new System.EventHandler(this.BTFormMinBox_Click);
+            // 
+            // BTFormMaxBox
+            // 
+            this.BTFormMaxBox.FlatAppearance.BorderSize = 0;
+            this.BTFormMaxBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.BTFormMaxBox.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.BTFormMaxBox.ForeColor = System.Drawing.Color.White;
+            this.BTFormMaxBox.Location = new System.Drawing.Point(44, 7);
+            this.BTFormMaxBox.Name = "BTFormMaxBox";
+            this.BTFormMaxBox.Size = new System.Drawing.Size(32, 26);
+            this.BTFormMaxBox.TabIndex = 1;
+            this.BTFormMaxBox.Text = "□";
+            this.BTFormMaxBox.UseVisualStyleBackColor = true;
+            this.BTFormMaxBox.Click += new System.EventHandler(this.BTFormMaxBox_Click);
+            // 
+            // BTFormCloseBox
+            // 
+            this.BTFormCloseBox.FlatAppearance.BorderSize = 0;
+            this.BTFormCloseBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.BTFormCloseBox.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.BTFormCloseBox.ForeColor = System.Drawing.Color.White;
+            this.BTFormCloseBox.Location = new System.Drawing.Point(82, 7);
+            this.BTFormCloseBox.Name = "BTFormCloseBox";
+            this.BTFormCloseBox.Size = new System.Drawing.Size(32, 26);
+            this.BTFormCloseBox.TabIndex = 0;
+            this.BTFormCloseBox.Text = "×";
+            this.BTFormCloseBox.UseVisualStyleBackColor = true;
+            this.BTFormCloseBox.Click += new System.EventHandler(this.BTFormCloseBox_Click);
+            // 
+            // PNHeadIcon
+            // 
+            this.PNHeadIcon.Controls.Add(this.PBHeadIcon);
+            this.PNHeadIcon.Dock = System.Windows.Forms.DockStyle.Left;
+            this.PNHeadIcon.Location = new System.Drawing.Point(0, 0);
+            this.PNHeadIcon.Name = "PNHeadIcon";
+            this.PNHeadIcon.Size = new System.Drawing.Size(52, 52);
+            this.PNHeadIcon.TabIndex = 5;
+            // 
+            // PBHeadIcon
+            // 
+            this.PBHeadIcon.BackColor = System.Drawing.Color.White;
+            this.PBHeadIcon.Location = new System.Drawing.Point(10, 10);
+            this.PBHeadIcon.Name = "PBHeadIcon";
+            this.PBHeadIcon.Size = new System.Drawing.Size(32, 32);
+            this.PBHeadIcon.TabIndex = 0;
+            this.PBHeadIcon.TabStop = false;
+            // 
+            // DarkTitleForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.DimGray;
+            this.ClientSize = new System.Drawing.Size(1370, 772);
+            this.Controls.Add(this.PNHead);
+            this.Name = "DarkTitleForm";
+            this.Text = "DarkTitleForm";
+            this.Load += new System.EventHandler(this.DarkTitleForm_Load);
+            this.PNHead.ResumeLayout(false);
+            this.PNHeadTitle.ResumeLayout(false);
+            this.PNHeadButton.ResumeLayout(false);
+            this.PNHeadIcon.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.PBHeadIcon)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Panel PNHead;
+        private System.Windows.Forms.Panel PNHeadButton;
+        private System.Windows.Forms.Panel PNHeadIcon;
+        private System.Windows.Forms.Panel PNHeadTitle;
+        private System.Windows.Forms.PictureBox PBHeadIcon;
+        private System.Windows.Forms.Button BTFormMinBox;
+        private System.Windows.Forms.Button BTFormMaxBox;
+        private System.Windows.Forms.Button BTFormCloseBox;
+        public System.Windows.Forms.Label LBHeadTitle;
+    }
+}

+ 68 - 0
Fork.Net/Y.Skin/YoForm/CustomTitle/DarkTitleForm.cs

@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using Y.Skin.YoForm.NoTitle;
+using Y.Utils.WindowsUtils.APIUtils;
+
+namespace Y.Skin.YoForm.CustomTitle
+{
+    public partial class DarkTitleForm : NoTitleForm
+    {
+        public DarkTitleForm()
+        {
+            InitializeComponent();
+        }
+        private void DarkTitleForm_Load(object sender, EventArgs e)
+        {
+            PBHeadIcon.Image = Icon.ToBitmap();
+        }
+        /// <summary>
+        /// 拖动窗口移动
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void LBHeadTitle_MouseMove(object sender, MouseEventArgs e)
+        {
+            if (e.Button == MouseButtons.Left)
+            {
+                FormStyleAPI.ReleaseCapture();
+                FormStyleAPI.SendMessage(Handle, FormStyleAPI.WM_NCLBUTTONDOWN, FormStyleAPI.HTCAPTION, 0);
+            }
+        }
+        /// <summary>
+        /// 最小化
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void BTFormMinBox_Click(object sender, EventArgs e)
+        {
+            WindowState = FormWindowState.Minimized;
+        }
+        /// <summary>
+        /// 最大化及还原
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void BTFormMaxBox_Click(object sender, EventArgs e)
+        {
+            if (WindowState != FormWindowState.Maximized)
+                WindowState = FormWindowState.Maximized;
+            else
+                WindowState = FormWindowState.Normal;
+        }
+        /// <summary>
+        /// 关闭
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void BTFormCloseBox_Click(object sender, EventArgs e)
+        {
+            Close();
+        }
+    }
+}

+ 120 - 0
Fork.Net/Y.Skin/YoForm/CustomTitle/DarkTitleForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 38 - 0
Fork.Net/Y.Skin/YoForm/CustomTitle/DarkTitleHorizontalForm.Designer.cs

@@ -0,0 +1,38 @@
+namespace Y.Skin.YoForm.CustomTitle
+{
+    partial class DarkTitleHorizontalForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Text = "DarkTitleHorizontalForm";
+        }
+
+        #endregion
+    }
+}

+ 19 - 0
Fork.Net/Y.Skin/YoForm/CustomTitle/DarkTitleHorizontalForm.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Y.Skin.YoForm.CustomTitle
+{
+    public partial class DarkTitleHorizontalForm : Form
+    {
+        public DarkTitleHorizontalForm()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 38 - 0
Fork.Net/Y.Skin/YoForm/CustomTitle/DarkTitleVerticalForm.Designer.cs

@@ -0,0 +1,38 @@
+namespace Y.Skin.YoForm.CustomTitle
+{
+    partial class DarkTitleVerticalForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Text = "DarkTitleVerticalForm";
+        }
+
+        #endregion
+    }
+}

+ 19 - 0
Fork.Net/Y.Skin/YoForm/CustomTitle/DarkTitleVerticalForm.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Y.Skin.YoForm.CustomTitle
+{
+    public partial class DarkTitleVerticalForm : Form
+    {
+        public DarkTitleVerticalForm()
+        {
+            InitializeComponent();
+        }
+    }
+}