├── screenshots ├── mditab_control.png ├── mditabcontrol.png └── mditabcontrol2.png ├── src ├── sample │ ├── Resources │ │ ├── Border.png │ │ ├── BackActive.png │ │ ├── CloseActive.png │ │ ├── DefaultIcon.ico │ │ ├── ForwardActive.png │ │ ├── ToolsActive.png │ │ ├── BookmarksActive.png │ │ ├── ToolbarBackground.png │ │ └── ButtonHoverBackground.png │ ├── Resourcesx │ │ ├── Border.png │ │ ├── BackActive.png │ │ ├── CloseActive.png │ │ ├── DefaultIcon.ico │ │ ├── ToolsActive.png │ │ ├── ForwardActive.png │ │ ├── BookmarksActive.png │ │ ├── ToolbarBackground.png │ │ └── ButtonHoverBackground.png │ ├── BasicForm.cs │ ├── Properties │ │ ├── Settings.settings │ │ ├── Settings.Designer.cs │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ └── Resources.resx │ ├── Program.cs │ ├── MainForm.cs │ ├── MdiTabCtrlSample.sln │ ├── BasicForm.Designer.cs │ ├── MainForm.Designer.cs │ ├── BrowserForm.cs │ ├── MdiTabCtrlSample.csproj │ ├── BrowserForm.resx │ ├── MainForm.resx │ ├── Resources.Designer.cs │ ├── .gitignore │ ├── Resources.resx │ └── BrowserForm.Designer.cs ├── My Project │ ├── Settings.settings │ ├── Application.Designer.vb │ ├── Application.myapp │ ├── AssemblyInfo.vb │ ├── Resources.Designer.vb │ ├── Settings.Designer.vb │ └── Resources.resx ├── MdiTabCtrl.nuspec ├── TabPage.Designer.vb ├── ControlButton.Designer.vb ├── MdiTabCtrl.sln ├── MdiTabCtrl.vbproj ├── ControlButton.vb ├── TabControl.Designer.vb ├── TabControl.resx ├── .gitignore └── TabPage.vb ├── README.md └── .gitignore /screenshots/mditab_control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/screenshots/mditab_control.png -------------------------------------------------------------------------------- /screenshots/mditabcontrol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/screenshots/mditabcontrol.png -------------------------------------------------------------------------------- /screenshots/mditabcontrol2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/screenshots/mditabcontrol2.png -------------------------------------------------------------------------------- /src/sample/Resources/Border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resources/Border.png -------------------------------------------------------------------------------- /src/sample/Resourcesx/Border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resourcesx/Border.png -------------------------------------------------------------------------------- /src/sample/Resources/BackActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resources/BackActive.png -------------------------------------------------------------------------------- /src/sample/Resources/CloseActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resources/CloseActive.png -------------------------------------------------------------------------------- /src/sample/Resources/DefaultIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resources/DefaultIcon.ico -------------------------------------------------------------------------------- /src/sample/Resources/ForwardActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resources/ForwardActive.png -------------------------------------------------------------------------------- /src/sample/Resources/ToolsActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resources/ToolsActive.png -------------------------------------------------------------------------------- /src/sample/Resourcesx/BackActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resourcesx/BackActive.png -------------------------------------------------------------------------------- /src/sample/Resourcesx/CloseActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resourcesx/CloseActive.png -------------------------------------------------------------------------------- /src/sample/Resourcesx/DefaultIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resourcesx/DefaultIcon.ico -------------------------------------------------------------------------------- /src/sample/Resourcesx/ToolsActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resourcesx/ToolsActive.png -------------------------------------------------------------------------------- /src/sample/Resources/BookmarksActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resources/BookmarksActive.png -------------------------------------------------------------------------------- /src/sample/Resourcesx/ForwardActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resourcesx/ForwardActive.png -------------------------------------------------------------------------------- /src/sample/Resources/ToolbarBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resources/ToolbarBackground.png -------------------------------------------------------------------------------- /src/sample/Resourcesx/BookmarksActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resourcesx/BookmarksActive.png -------------------------------------------------------------------------------- /src/sample/Resourcesx/ToolbarBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resourcesx/ToolbarBackground.png -------------------------------------------------------------------------------- /src/sample/Resources/ButtonHoverBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resources/ButtonHoverBackground.png -------------------------------------------------------------------------------- /src/sample/Resourcesx/ButtonHoverBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JacksiroKe/MdiTabCtrl/HEAD/src/sample/Resourcesx/ButtonHoverBackground.png -------------------------------------------------------------------------------- /src/sample/BasicForm.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | namespace MdiTabCtrlSample 4 | { 5 | public partial class BasicForm : Form 6 | { 7 | public BasicForm() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/sample/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/My Project/Application.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | -------------------------------------------------------------------------------- /src/My Project/Application.myapp: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | false 5 | 0 6 | true 7 | 0 8 | 1 9 | true 10 | 11 | -------------------------------------------------------------------------------- /src/sample/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace MdiTabCtrlSample 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new MainForm()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/MdiTabCtrl.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MdiTabCtrl 5 | 1.0.0.1 6 | MDI Tab Control 7 | JacksiroKe 8 | false 9 | MIT 10 | https://github.com/JacksiroKe/MdiTabCtrl/ 11 | A highly configurable MDI tab control for c# to use as tabbed MDI forms 12 | first realease. 13 | JacksiroKe 14 | Controls UI MDI Tab 15 | 16 | -------------------------------------------------------------------------------- /src/TabPage.Designer.vb: -------------------------------------------------------------------------------- 1 | _ 2 | Partial Class TabPage 3 | Inherits System.Windows.Forms.Control 4 | 5 | 'Control overrides dispose to clean up the component list. 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | If disposing AndAlso components IsNot Nothing Then 9 | components.Dispose() 10 | End If 11 | MyBase.Dispose(disposing) 12 | End Sub 13 | 14 | 'Required by the Control Designer 15 | Private components As System.ComponentModel.IContainer 16 | 17 | ' NOTE: The following procedure is required by the Component Designer 18 | ' It can be modified using the Component Designer. Do not modify it 19 | ' using the code editor. 20 | _ 21 | Private Sub InitializeComponent() 22 | components = New System.ComponentModel.Container() 23 | End Sub 24 | 25 | End Class 26 | 27 | -------------------------------------------------------------------------------- /src/ControlButton.Designer.vb: -------------------------------------------------------------------------------- 1 | _ 2 | Partial Class ControlButton 3 | Inherits System.Windows.Forms.Control 4 | 5 | 'Control overrides dispose to clean up the component list. 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | If disposing AndAlso components IsNot Nothing Then 9 | components.Dispose() 10 | End If 11 | MyBase.Dispose(disposing) 12 | End Sub 13 | 14 | 'Required by the Control Designer 15 | Private components As System.ComponentModel.IContainer 16 | 17 | ' NOTE: The following procedure is required by the Component Designer 18 | ' It can be modified using the Component Designer. Do not modify it 19 | ' using the code editor. 20 | _ 21 | Private Sub InitializeComponent() 22 | components = New System.ComponentModel.Container() 23 | End Sub 24 | 25 | End Class 26 | 27 | -------------------------------------------------------------------------------- /src/sample/MainForm.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | namespace MdiTabCtrlSample 4 | { 5 | public partial class MainForm : Form 6 | { 7 | private int tabcount; 8 | 9 | public MainForm() 10 | { 11 | InitializeComponent(); 12 | 13 | NewEmptyTab(); 14 | NewEmptyTab(); 15 | NewBrowserTab(); 16 | //tabControl1.TabPages[1].Select(); //select a tab page of choice 17 | } 18 | 19 | public void NewBrowserTab() 20 | { 21 | Form cform = new BrowserForm(); 22 | cform.Text = "This is a Browser Tab"; //Declare text for this tab 23 | tabControl1.TabPages.Add(cform); 24 | } 25 | 26 | public void NewEmptyTab() 27 | { 28 | Form cform = new BasicForm(); //call an instance of a class you want to show in a tab 29 | tabcount = tabcount + 1; 30 | cform.Text = "This is an Empty Tab " + tabcount; //Declare text for this tab 31 | tabControl1.TabPages.Add(cform); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/sample/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace MdiTabCtrlSample.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/sample/MdiTabCtrlSample.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30413.136 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MdiTabCtrlSample", "MdiTabCtrlSample.csproj", "{55207EBE-DE99-43C1-A9FB-A55173F272D6}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {55207EBE-DE99-43C1-A9FB-A55173F272D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {55207EBE-DE99-43C1-A9FB-A55173F272D6}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {55207EBE-DE99-43C1-A9FB-A55173F272D6}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {55207EBE-DE99-43C1-A9FB-A55173F272D6}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {273D41F0-0983-40DD-91C9-40D118E39547} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /src/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Reflection 3 | Imports System.Runtime.InteropServices 4 | 5 | ' General Information about an assembly is controlled through the following 6 | ' set of attributes. Change these attribute values to modify the information 7 | ' associated with an assembly. 8 | 9 | ' Review the values of the assembly attributes 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 'The following GUID is for the ID of the typelib if this project is exposed to COM 21 | 22 | 23 | ' Version information for an assembly consists of the following four values: 24 | ' 25 | ' Major Version 26 | ' Minor Version 27 | ' Build Number 28 | ' Revision 29 | ' 30 | ' You can specify all the values or you can default the Build and Revision Numbers 31 | ' by using the '*' as shown below: 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/sample/BasicForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MdiTabCtrlSample 2 | { 3 | partial class BasicForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 33 | this.ClientSize = new System.Drawing.Size(800, 450); 34 | this.Text = "ChildForm"; 35 | } 36 | 37 | #endregion 38 | } 39 | } -------------------------------------------------------------------------------- /src/sample/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MdiTabCtrlSample")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MdiTabCtrlSample")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("55207ebe-de99-43c1-a9fb-a55173f272d6")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MDI TAB CONTROL 2 | 3 | Well behold a highly configurable MDI tab control for c# to use as tabbed MDI forms 4 | 5 | 6 | ## FEATURES OF THIS CONTROL 7 | This tab control is specific to creating a MDI interface with one tab page for each form. Some of the behaviours that were implemented are: 8 | 1. Always open the new page at the first tab 9 | 2. Hide the tab pages that can't fit in the screen 10 | 3. Don't scroll tab pages, instead, bring a hidden tab page to the first position when it's selected 11 | 4. Have a list of the tab pages (forms) in a drop down menu 12 | 5. Ability to reorder tabs by dragging 13 | 6. Easy owner draw 14 | 7. Close button at the tab 15 | 8. Clicking on overlapped part of the tab does not select the other tab and also 16 | 9. Clicking outside the border doesn't select the tab (achieved by the Region property) 17 | 10. Expose the maximum of functionality and configurability as possible 18 | 11. Very simple to use 19 | 20 | ## WHAT CAN BE CUSTOMIZED IN THIS CONTROL 21 | Almost everything. To understand the control, let's take a look at the objects and regions. 22 | 23 | * The first two lines are the TopSeparator 24 | * Followed by the TabTop 25 | * On the left the Tabs area 26 | * On the right the Control Buttons area 27 | * The space between the tabs is the TabOffset 28 | * All the bottom part is the form 29 | 30 | ## HOW TO USE THIS CONTROL 31 | * MDI Tab Control Wiki 32 | 33 | ## Nuget Package 34 | * MDI Tab Control -------------------------------------------------------------------------------- /src/MdiTabCtrl.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 16 3 | VisualStudioVersion = 16.0.30204.135 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "MdiTabCtrl", "MdiTabCtrl.vbproj", "{7F98F809-CE14-43D5-B3DF-40D8F0B7A1AF}" 6 | EndProject 7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MdiTabCtrlSample", "sample\MdiTabCtrlSample.csproj", "{55207EBE-DE99-43C1-A9FB-A55173F272D6}" 8 | EndProject 9 | Global 10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 11 | Debug|Any CPU = Debug|Any CPU 12 | Release|Any CPU = Release|Any CPU 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {7F98F809-CE14-43D5-B3DF-40D8F0B7A1AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 16 | {7F98F809-CE14-43D5-B3DF-40D8F0B7A1AF}.Debug|Any CPU.Build.0 = Debug|Any CPU 17 | {7F98F809-CE14-43D5-B3DF-40D8F0B7A1AF}.Release|Any CPU.ActiveCfg = Release|Any CPU 18 | {7F98F809-CE14-43D5-B3DF-40D8F0B7A1AF}.Release|Any CPU.Build.0 = Release|Any CPU 19 | {55207EBE-DE99-43C1-A9FB-A55173F272D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 20 | {55207EBE-DE99-43C1-A9FB-A55173F272D6}.Debug|Any CPU.Build.0 = Debug|Any CPU 21 | {55207EBE-DE99-43C1-A9FB-A55173F272D6}.Release|Any CPU.ActiveCfg = Release|Any CPU 22 | {55207EBE-DE99-43C1-A9FB-A55173F272D6}.Release|Any CPU.Build.0 = Release|Any CPU 23 | EndGlobalSection 24 | GlobalSection(SolutionProperties) = preSolution 25 | HideSolutionNode = FALSE 26 | EndGlobalSection 27 | GlobalSection(ExtensibilityGlobals) = postSolution 28 | SolutionGuid = {5E3F4A0D-322A-4208-BAF2-39847455F7B1} 29 | EndGlobalSection 30 | EndGlobal 31 | -------------------------------------------------------------------------------- /src/sample/MainForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MdiTabCtrlSample 2 | { 3 | partial class MainForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.tabControl1 = new JacksiroKe.MdiTabCtrl.TabControl(); 32 | this.SuspendLayout(); 33 | // 34 | // tabControl1 35 | // 36 | this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; 37 | this.tabControl1.Location = new System.Drawing.Point(0, 0); 38 | this.tabControl1.MenuRenderer = null; 39 | this.tabControl1.Name = "tabControl1"; 40 | this.tabControl1.Size = new System.Drawing.Size(800, 450); 41 | this.tabControl1.TabCloseButtonImage = null; 42 | this.tabControl1.TabCloseButtonImageDisabled = null; 43 | this.tabControl1.TabCloseButtonImageHot = null; 44 | this.tabControl1.TabIndex = 0; 45 | // 46 | // MainForm 47 | // 48 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 49 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 50 | this.ClientSize = new System.Drawing.Size(800, 450); 51 | this.Controls.Add(this.tabControl1); 52 | this.KeyPreview = true; 53 | this.Name = "MainForm"; 54 | this.Text = "MainForm"; 55 | this.ResumeLayout(false); 56 | 57 | } 58 | 59 | #endregion 60 | 61 | private JacksiroKe.MdiTabCtrl.TabControl tabControl1; 62 | } 63 | } -------------------------------------------------------------------------------- /src/My Project/Resources.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | Imports System 15 | 16 | Namespace My.Resources 17 | 18 | 'This class was auto-generated by the StronglyTypedResourceBuilder 19 | 'class via a tool like ResGen or Visual Studio. 20 | 'To add or remove a member, edit your .ResX file then rerun ResGen 21 | 'with the /str option, or rebuild your VS project. 22 | ''' 23 | ''' A strongly-typed resource class, for looking up localized strings, etc. 24 | ''' 25 | _ 29 | Friend Module Resources 30 | 31 | Private resourceMan As Global.System.Resources.ResourceManager 32 | 33 | Private resourceCulture As Global.System.Globalization.CultureInfo 34 | 35 | ''' 36 | ''' Returns the cached ResourceManager instance used by this class. 37 | ''' 38 | _ 39 | Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager 40 | Get 41 | If Object.ReferenceEquals(resourceMan, Nothing) Then 42 | Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("JacksiroKe.MdiTabCtrl.Resources", GetType(Resources).Assembly) 43 | resourceMan = temp 44 | End If 45 | Return resourceMan 46 | End Get 47 | End Property 48 | 49 | ''' 50 | ''' Overrides the current thread's CurrentUICulture property for all 51 | ''' resource lookups using this strongly typed resource class. 52 | ''' 53 | _ 54 | Friend Property Culture() As Global.System.Globalization.CultureInfo 55 | Get 56 | Return resourceCulture 57 | End Get 58 | Set 59 | resourceCulture = value 60 | End Set 61 | End Property 62 | End Module 63 | End Namespace 64 | -------------------------------------------------------------------------------- /src/My Project/Settings.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | _ 20 | Partial Friend NotInheritable Class MySettings 21 | Inherits Global.System.Configuration.ApplicationSettingsBase 22 | 23 | Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) 24 | 25 | #Region "My.Settings Auto-Save Functionality" 26 | #If _MyType = "WindowsForms" Then 27 | Private Shared addedHandler As Boolean 28 | 29 | Private Shared addedHandlerLockObject As New Object 30 | 31 | _ 32 | Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) 33 | If My.Application.SaveMySettingsOnExit Then 34 | My.Settings.Save() 35 | End If 36 | End Sub 37 | #End If 38 | #End Region 39 | 40 | Public Shared ReadOnly Property [Default]() As MySettings 41 | Get 42 | 43 | #If _MyType = "WindowsForms" Then 44 | If Not addedHandler Then 45 | SyncLock addedHandlerLockObject 46 | If Not addedHandler Then 47 | AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings 48 | addedHandler = True 49 | End If 50 | End SyncLock 51 | End If 52 | #End If 53 | Return defaultInstance 54 | End Get 55 | End Property 56 | End Class 57 | End Namespace 58 | 59 | Namespace My 60 | 61 | _ 64 | Friend Module MySettingsProperty 65 | 66 | _ 67 | Friend ReadOnly Property Settings() As Global.JacksiroKe.MdiTabCtrl.My.MySettings 68 | Get 69 | Return Global.JacksiroKe.MdiTabCtrl.My.MySettings.Default 70 | End Get 71 | End Property 72 | End Module 73 | End Namespace 74 | -------------------------------------------------------------------------------- /src/sample/BrowserForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Net; 6 | using System.Text.RegularExpressions; 7 | using System.Windows.Forms; 8 | 9 | namespace MdiTabCtrlSample 10 | { 11 | public partial class BrowserForm : Form 12 | { 13 | public BrowserForm() 14 | { 15 | InitializeComponent(); 16 | webBrowser.Url = new Uri(urlTextBox.Text); 17 | webBrowser.DocumentCompleted += webBrowser_DocumentCompleted; 18 | } 19 | 20 | void webBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) 21 | { 22 | if (urlTextBox.Text != "about:blank") 23 | { 24 | Text = webBrowser.DocumentTitle; 25 | urlTextBox.Text = webBrowser.Url.ToString(); 26 | 27 | if (webBrowser.Url.Scheme == "http" || webBrowser.Url.Scheme == "https") 28 | { 29 | try 30 | { 31 | WebRequest webRequest = WebRequest.Create(webBrowser.Url.Scheme + "://" + webBrowser.Url.Host + "/favicon.ico"); 32 | WebResponse response = webRequest.GetResponse(); 33 | Stream stream = response.GetResponseStream(); 34 | 35 | if (stream != null) 36 | { 37 | byte[] buffer = new byte[1024]; 38 | 39 | using (MemoryStream ms = new MemoryStream()) 40 | { 41 | int read; 42 | 43 | while ((read = stream.Read(buffer, 0, buffer.Length)) > 0) 44 | ms.Write(buffer, 0, read); 45 | 46 | ms.Seek(0, SeekOrigin.Begin); 47 | 48 | Icon = new Icon(ms); 49 | 50 | //ParentTabs.UpdateThumbnailPreviewIcon(ParentTabs.Tabs.Single(t => t.Content == this)); 51 | //ParentTabs.RedrawTabs(); 52 | } 53 | } 54 | } 55 | 56 | catch 57 | { 58 | Icon = Resources.DefaultIcon; 59 | } 60 | } 61 | 62 | Parent.Refresh(); 63 | } 64 | 65 | else 66 | Icon = Resources.DefaultIcon; 67 | } 68 | 69 | private void backButton_MouseEnter(object sender, EventArgs e) 70 | { 71 | backButton.BackgroundImage = Resources.ButtonHoverBackground; 72 | } 73 | 74 | private void backButton_MouseLeave(object sender, EventArgs e) 75 | { 76 | backButton.BackgroundImage = null; 77 | } 78 | 79 | private void urlTextBox_KeyDown(object sender, KeyEventArgs e) 80 | { 81 | if (e.KeyCode == Keys.Enter) 82 | { 83 | string fullUrl = urlTextBox.Text; 84 | 85 | if (!Regex.IsMatch(fullUrl, "^[a-zA-Z0-9]+\\://")) 86 | fullUrl = "http://" + fullUrl; 87 | 88 | Uri uri = new Uri(fullUrl); 89 | webBrowser.Navigate(uri); 90 | } 91 | } 92 | 93 | private void forwardButton_MouseEnter(object sender, EventArgs e) 94 | { 95 | forwardButton.BackgroundImage = Resources.ButtonHoverBackground; 96 | } 97 | 98 | private void forwardButton_MouseLeave(object sender, EventArgs e) 99 | { 100 | forwardButton.BackgroundImage = null; 101 | } 102 | 103 | private void backButton_Click(object sender, EventArgs e) 104 | { 105 | webBrowser.GoBack(); 106 | } 107 | 108 | private void forwardButton_Click(object sender, EventArgs e) 109 | { 110 | webBrowser.GoForward(); 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /src/MdiTabCtrl.vbproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.50727 7 | 2.0 8 | {7F98F809-CE14-43D5-B3DF-40D8F0B7A1AF} 9 | Library 10 | JacksiroKe.MdiTabCtrl 11 | JacksiroKe.MdiTabCtrl 12 | Windows 13 | 14 | 15 | 16 | 17 | 3.5 18 | 19 | 20 | true 21 | full 22 | true 23 | true 24 | bin\Debug\ 25 | 26 | 27 | _MYFORMS=True 28 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355 29 | 30 | 31 | pdbonly 32 | false 33 | true 34 | true 35 | bin\Debug\ 36 | 37 | 38 | _MYFORMS=True 39 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | ControlButton.vb 61 | 62 | 63 | Component 64 | 65 | 66 | TabPage.vb 67 | 68 | 69 | Component 70 | 71 | 72 | TabControl.vb 73 | 74 | 75 | UserControl 76 | 77 | 78 | True 79 | Application.myapp 80 | True 81 | 82 | 83 | 84 | True 85 | True 86 | Resources.resx 87 | 88 | 89 | True 90 | Settings.settings 91 | True 92 | 93 | 94 | 95 | 96 | TabControl.vb 97 | Designer 98 | 99 | 100 | VbMyResourcesResXFileCodeGenerator 101 | Resources.Designer.vb 102 | My.Resources 103 | Designer 104 | 105 | 106 | 107 | 108 | MyApplicationCodeGenerator 109 | Application.Designer.vb 110 | 111 | 112 | SettingsSingleFileGenerator 113 | My 114 | Settings.Designer.vb 115 | 116 | 117 | 118 | 119 | 120 | 121 | 128 | -------------------------------------------------------------------------------- /src/sample/MdiTabCtrlSample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {55207EBE-DE99-43C1-A9FB-A55173F272D6} 8 | WinExe 9 | MdiTabCtrlSample 10 | MdiTabCtrlSample 11 | v4.0 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | ..\..\..\..\Downloads\MDITabControl\MdiTabControl\MdiTabControl\bin\Debug\MdiTabControl.dll 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | Form 53 | 54 | 55 | BasicForm.cs 56 | 57 | 58 | Form 59 | 60 | 61 | BrowserForm.cs 62 | 63 | 64 | Form 65 | 66 | 67 | MainForm.cs 68 | 69 | 70 | 71 | 72 | True 73 | True 74 | Resources.resx 75 | 76 | 77 | BrowserForm.cs 78 | 79 | 80 | MainForm.cs 81 | 82 | 83 | ResXFileCodeGenerator 84 | Resources.Designer.cs 85 | Designer 86 | 87 | 88 | True 89 | Resources.resx 90 | True 91 | 92 | 93 | ResXFileCodeGenerator 94 | Resources.Designer.cs 95 | 96 | 97 | SettingsSingleFileGenerator 98 | Settings.Designer.cs 99 | 100 | 101 | True 102 | Settings.settings 103 | True 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | {7F98F809-CE14-43D5-B3DF-40D8F0B7A1AF} 120 | MdiTabCtrl 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /src/ControlButton.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel 2 | 3 | Friend Class ControlButton 4 | 5 | Sub New() 6 | ' This call is required by the Windows Form Designer. 7 | InitializeComponent() 8 | ' Add any initialization after the InitializeComponent() call. 9 | Me.SuspendLayout() 10 | Me.SetStyle(ControlStyles.SupportsTransparentBackColor, True) 11 | MyBase.BackColor = Color.Transparent 12 | ResetBackHighColor() 13 | ResetBackLowColor() 14 | ResetBorderColor() 15 | Me.ResumeLayout() 16 | End Sub 17 | 18 | Enum ButtonStyle 19 | Close 20 | Drop 21 | End Enum 22 | 23 | Private m_hot As Boolean = False 24 | Private m_BackHighColor As Color 25 | Private m_BackLowColor As Color 26 | Private m_BorderColor As Color 27 | Private m_style As ButtonStyle 28 | Private m_RenderMode As ToolStripRenderMode 29 | 30 | Private ReadOnly defaultBackHighColor As Color = SystemColors.ControlLightLight 31 | Private ReadOnly defaultBackLowColor As Color = SystemColors.ControlDark 32 | Private ReadOnly defaultBorderColor As Color = SystemColors.ControlDarkDark 33 | 34 | Friend Property RenderMode() As ToolStripRenderMode 35 | Get 36 | Return m_RenderMode 37 | End Get 38 | Set(ByVal value As ToolStripRenderMode) 39 | m_RenderMode = value 40 | Invalidate() 41 | End Set 42 | End Property 43 | 44 | Property Style() As ButtonStyle 45 | Get 46 | Return m_style 47 | End Get 48 | Set(ByVal value As ButtonStyle) 49 | m_style = value 50 | End Set 51 | End Property 52 | 53 | _ 54 | Public Property BackHighColor() As System.Drawing.Color 55 | Get 56 | Return m_BackHighColor 57 | End Get 58 | Set(ByVal Value As Color) 59 | m_BackHighColor = Value 60 | End Set 61 | End Property 62 | 63 | Public Function ShouldSerializeBackHighColor() As Boolean 64 | Return m_BackHighColor <> Me.defaultBackHighColor 65 | End Function 66 | 67 | Public Sub ResetBackHighColor() 68 | m_BackHighColor = Me.defaultBackHighColor 69 | End Sub 70 | 71 | _ 72 | Public Property BackLowColor() As Color 73 | Get 74 | Return m_BackLowColor 75 | End Get 76 | Set(ByVal Value As Color) 77 | m_BackLowColor = Value 78 | End Set 79 | End Property 80 | 81 | Public Function ShouldSerializeBackLowColor() As Boolean 82 | Return m_BackLowColor <> Me.defaultBackLowColor 83 | End Function 84 | 85 | Public Sub ResetBackLowColor() 86 | m_BackLowColor = Me.defaultBackLowColor 87 | End Sub 88 | 89 | _ 90 | Public Property BorderColor() As Color 91 | Get 92 | Return m_BorderColor 93 | End Get 94 | Set(ByVal Value As Color) 95 | m_BorderColor = Value 96 | End Set 97 | End Property 98 | 99 | Public Function ShouldSerializeBorderColor() As Boolean 100 | Return m_BorderColor <> Me.defaultBorderColor 101 | End Function 102 | 103 | Public Sub ResetBorderColor() 104 | m_BorderColor = Me.defaultBorderColor 105 | End Sub 106 | 107 | _ 108 | Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs) 109 | Dim DropPoints() As System.Drawing.Point = {New Point(0, 0), New Point(11, 0), New Point(5, 6)} 110 | Dim ClosePoints() As System.Drawing.Point = {New Point(0, 0), New Point(2, 0), New Point(5, 3), New Point(8, 0), New Point(10, 0), New Point(6, 4), New Point(10, 8), New Point(8, 8), New Point(5, 5), New Point(2, 8), New Point(0, 8), New Point(4, 4)} 111 | Dim rec As New Rectangle 112 | rec.Size = New Size(Me.Width - 1, Me.Height - 1) 113 | If m_hot Then 114 | e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias 115 | e.Graphics.FillRectangle(New Drawing2D.LinearGradientBrush(New Point(0, 0), New Point(0, Me.Height), RenderColors.ControlButtonBackHighColor(m_RenderMode, m_BackHighColor), RenderColors.ControlButtonBackLowColor(m_RenderMode, m_BackLowColor)), rec) 116 | e.Graphics.DrawRectangle(New Pen(RenderColors.ControlButtonBorderColor(m_RenderMode, m_BorderColor)), rec) 117 | e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.Default 118 | End If 119 | Dim g As New Drawing2D.GraphicsPath 120 | Dim m As New Drawing2D.Matrix 121 | Dim x As Integer = (Me.Width - 11) / 2 122 | Dim y As Integer = (Me.Height - 11) / 2 + 1 123 | If m_style = ButtonStyle.Drop Then 124 | e.Graphics.FillRectangle(New SolidBrush(ForeColor), x, y, 11, 2) 125 | g.AddPolygon(DropPoints) 126 | m.Translate(x, y + 3) 127 | g.Transform(m) 128 | e.Graphics.FillPolygon(New SolidBrush(ForeColor), g.PathPoints) 129 | Else 130 | g.AddPolygon(ClosePoints) 131 | m.Translate(x, y) 132 | g.Transform(m) 133 | e.Graphics.DrawPolygon(New Pen(ForeColor), g.PathPoints) 134 | e.Graphics.FillPolygon(New SolidBrush(ForeColor), g.PathPoints) 135 | End If 136 | g.Dispose() 137 | m.Dispose() 138 | End Sub 139 | 140 | Private Sub MdiTab_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseEnter 141 | m_hot = True 142 | Invalidate() 143 | End Sub 144 | 145 | Private Sub MdiTab_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseLeave 146 | m_hot = False 147 | Invalidate() 148 | End Sub 149 | 150 | End Class 151 | -------------------------------------------------------------------------------- /src/TabControl.Designer.vb: -------------------------------------------------------------------------------- 1 | _ 2 | Partial Class TabControl 3 | Inherits System.Windows.Forms.UserControl 4 | 5 | 'UserControl overrides dispose to clean up the component list. 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | If disposing AndAlso components IsNot Nothing Then 9 | components.Dispose() 10 | End If 11 | MyBase.Dispose(disposing) 12 | End Sub 13 | 14 | 'Required by the Windows Form Designer 15 | Private components As System.ComponentModel.IContainer 16 | 17 | 'NOTE: The following procedure is required by the Windows Form Designer 18 | 'It can be modified using the Windows Form Designer. 19 | 'Do not modify it using the code editor. 20 | _ 21 | Private Sub InitializeComponent() 22 | Me.components = New System.ComponentModel.Container 23 | Me.pnlTop = New System.Windows.Forms.Panel 24 | Me.pnlControls = New System.Windows.Forms.Panel 25 | Me.DropButton = New MdiTabCtrl.ControlButton 26 | Me.CloseButton = New MdiTabCtrl.ControlButton 27 | Me.pnlTabs = New System.Windows.Forms.Panel 28 | Me.pnlBottom = New System.Windows.Forms.Panel 29 | Me.WinMenu = New System.Windows.Forms.ContextMenuStrip(Me.components) 30 | Me.TabToolTip = New System.Windows.Forms.ToolTip(Me.components) 31 | Me.pnlTop.SuspendLayout() 32 | Me.pnlControls.SuspendLayout() 33 | Me.SuspendLayout() 34 | ' 35 | 'pnlTop 36 | ' 37 | Me.pnlTop.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ 38 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 39 | Me.pnlTop.BackColor = System.Drawing.Color.Transparent 40 | Me.pnlTop.Controls.Add(Me.pnlControls) 41 | Me.pnlTop.Controls.Add(Me.pnlTabs) 42 | Me.pnlTop.Location = New System.Drawing.Point(0, 0) 43 | Me.pnlTop.Name = "pnlTop" 44 | Me.pnlTop.Size = New System.Drawing.Size(200, 31) 45 | Me.pnlTop.TabIndex = 6 46 | ' 47 | 'pnlControls 48 | ' 49 | Me.pnlControls.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ 50 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 51 | Me.pnlControls.Controls.Add(Me.DropButton) 52 | Me.pnlControls.Controls.Add(Me.CloseButton) 53 | Me.pnlControls.Location = New System.Drawing.Point(175, 0) 54 | Me.pnlControls.Name = "pnlControls" 55 | Me.pnlControls.Size = New System.Drawing.Size(25, 30) 56 | Me.pnlControls.TabIndex = 1 57 | ' 58 | 'DropButton 59 | ' 60 | Me.DropButton.BackColor = System.Drawing.Color.Transparent 61 | Me.DropButton.Location = New System.Drawing.Point(4, 8) 62 | Me.DropButton.Name = "DropButton" 63 | Me.DropButton.Size = New System.Drawing.Size(17, 15) 64 | Me.DropButton.Style = ControlButton.ButtonStyle.Drop 65 | Me.DropButton.TabIndex = 0 66 | ' 67 | 'CloseButton 68 | ' 69 | Me.CloseButton.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 70 | Me.CloseButton.BackColor = System.Drawing.Color.Transparent 71 | Me.CloseButton.Location = New System.Drawing.Point(4, 8) 72 | Me.CloseButton.Name = "CloseButton" 73 | Me.CloseButton.Size = New System.Drawing.Size(17, 15) 74 | Me.CloseButton.Style = ControlButton.ButtonStyle.Close 75 | Me.CloseButton.TabIndex = 0 76 | Me.CloseButton.Visible = False 77 | ' 78 | 'pnlTabs 79 | ' 80 | Me.pnlTabs.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 81 | Me.pnlTabs.BackColor = System.Drawing.Color.Transparent 82 | Me.pnlTabs.Location = New System.Drawing.Point(0, 3) 83 | Me.pnlTabs.Name = "pnlTabs" 84 | Me.pnlTabs.Size = New System.Drawing.Size(200, 28) 85 | Me.pnlTabs.TabIndex = 0 86 | ' 87 | 'pnlBottom 88 | ' 89 | Me.pnlBottom.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ 90 | Or System.Windows.Forms.AnchorStyles.Left) _ 91 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 92 | Me.pnlBottom.Location = New System.Drawing.Point(0, 31) 93 | Me.pnlBottom.Name = "pnlBottom" 94 | Me.pnlBottom.Size = New System.Drawing.Size(200, 99) 95 | Me.pnlBottom.TabIndex = 7 96 | ' 97 | 'WinMenu 98 | ' 99 | Me.WinMenu.Name = "WinMenu" 100 | Me.WinMenu.Size = New System.Drawing.Size(153, 26) 101 | ' 102 | 'TabControl 103 | ' 104 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None 105 | Me.Controls.Add(Me.pnlTop) 106 | Me.Controls.Add(Me.pnlBottom) 107 | Me.Name = "TabControl" 108 | Me.Size = New System.Drawing.Size(200, 130) 109 | Me.pnlTop.ResumeLayout(False) 110 | Me.pnlControls.ResumeLayout(False) 111 | Me.ResumeLayout(False) 112 | 113 | End Sub 114 | Friend WithEvents pnlTop As System.Windows.Forms.Panel 115 | Friend WithEvents pnlTabs As System.Windows.Forms.Panel 116 | Friend WithEvents pnlBottom As System.Windows.Forms.Panel 117 | Friend WithEvents WinMenu As System.Windows.Forms.ContextMenuStrip 118 | Friend WithEvents DropButton As MdiTabCtrl.ControlButton 119 | Friend WithEvents TabToolTip As System.Windows.Forms.ToolTip 120 | Friend WithEvents CloseButton As MdiTabCtrl.ControlButton 121 | Friend WithEvents pnlControls As System.Windows.Forms.Panel 122 | 123 | End Class 124 | -------------------------------------------------------------------------------- /src/sample/BrowserForm.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /src/sample/MainForm.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /src/My Project/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /src/sample/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace MdiTabCtrlSample.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MdiTabCtrlSample.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap BackActive { 67 | get { 68 | object obj = ResourceManager.GetObject("BackActive", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap BookmarksActive { 77 | get { 78 | object obj = ResourceManager.GetObject("BookmarksActive", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Drawing.Bitmap. 85 | /// 86 | internal static System.Drawing.Bitmap Border { 87 | get { 88 | object obj = ResourceManager.GetObject("Border", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// Looks up a localized resource of type System.Drawing.Bitmap. 95 | /// 96 | internal static System.Drawing.Bitmap ButtonHoverBackground { 97 | get { 98 | object obj = ResourceManager.GetObject("ButtonHoverBackground", resourceCulture); 99 | return ((System.Drawing.Bitmap)(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// Looks up a localized resource of type System.Drawing.Bitmap. 105 | /// 106 | internal static System.Drawing.Bitmap CloseActive { 107 | get { 108 | object obj = ResourceManager.GetObject("CloseActive", resourceCulture); 109 | return ((System.Drawing.Bitmap)(obj)); 110 | } 111 | } 112 | 113 | /// 114 | /// Looks up a localized resource of type System.Drawing.Bitmap. 115 | /// 116 | internal static System.Drawing.Bitmap ForwardActive { 117 | get { 118 | object obj = ResourceManager.GetObject("ForwardActive", resourceCulture); 119 | return ((System.Drawing.Bitmap)(obj)); 120 | } 121 | } 122 | 123 | /// 124 | /// Looks up a localized resource of type System.Drawing.Bitmap. 125 | /// 126 | internal static System.Drawing.Bitmap ToolbarBackground { 127 | get { 128 | object obj = ResourceManager.GetObject("ToolbarBackground", resourceCulture); 129 | return ((System.Drawing.Bitmap)(obj)); 130 | } 131 | } 132 | 133 | /// 134 | /// Looks up a localized resource of type System.Drawing.Bitmap. 135 | /// 136 | internal static System.Drawing.Bitmap ToolsActive { 137 | get { 138 | object obj = ResourceManager.GetObject("ToolsActive", resourceCulture); 139 | return ((System.Drawing.Bitmap)(obj)); 140 | } 141 | } 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /src/TabControl.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | 124 | 115, 17 125 | 126 | -------------------------------------------------------------------------------- /src/sample/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace MdiTabCtrlSample { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MdiTabCtrlSample.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap BackActive { 67 | get { 68 | object obj = ResourceManager.GetObject("BackActive", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap BookmarksActive { 77 | get { 78 | object obj = ResourceManager.GetObject("BookmarksActive", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Drawing.Bitmap. 85 | /// 86 | internal static System.Drawing.Bitmap Border { 87 | get { 88 | object obj = ResourceManager.GetObject("Border", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// Looks up a localized resource of type System.Drawing.Bitmap. 95 | /// 96 | internal static System.Drawing.Bitmap ButtonHoverBackground { 97 | get { 98 | object obj = ResourceManager.GetObject("ButtonHoverBackground", resourceCulture); 99 | return ((System.Drawing.Bitmap)(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// Looks up a localized resource of type System.Drawing.Bitmap. 105 | /// 106 | internal static System.Drawing.Bitmap CloseActive { 107 | get { 108 | object obj = ResourceManager.GetObject("CloseActive", resourceCulture); 109 | return ((System.Drawing.Bitmap)(obj)); 110 | } 111 | } 112 | 113 | /// 114 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). 115 | /// 116 | internal static System.Drawing.Icon DefaultIcon { 117 | get { 118 | object obj = ResourceManager.GetObject("DefaultIcon", resourceCulture); 119 | return ((System.Drawing.Icon)(obj)); 120 | } 121 | } 122 | 123 | /// 124 | /// Looks up a localized resource of type System.Drawing.Bitmap. 125 | /// 126 | internal static System.Drawing.Bitmap ForwardActive { 127 | get { 128 | object obj = ResourceManager.GetObject("ForwardActive", resourceCulture); 129 | return ((System.Drawing.Bitmap)(obj)); 130 | } 131 | } 132 | 133 | /// 134 | /// Looks up a localized resource of type System.Drawing.Bitmap. 135 | /// 136 | internal static System.Drawing.Bitmap ToolbarBackground { 137 | get { 138 | object obj = ResourceManager.GetObject("ToolbarBackground", resourceCulture); 139 | return ((System.Drawing.Bitmap)(obj)); 140 | } 141 | } 142 | 143 | /// 144 | /// Looks up a localized resource of type System.Drawing.Bitmap. 145 | /// 146 | internal static System.Drawing.Bitmap ToolsActive { 147 | get { 148 | object obj = ResourceManager.GetObject("ToolsActive", resourceCulture); 149 | return ((System.Drawing.Bitmap)(obj)); 150 | } 151 | } 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | *.exe 19 | 20 | # Build results 21 | [Dd]ebug/ 22 | [Dd]ebugPublic/ 23 | [Rr]elease/ 24 | [Rr]eleases/ 25 | x64/ 26 | x86/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # StyleCop 66 | StyleCopReport.xml 67 | 68 | # Files built by Visual Studio 69 | *_i.c 70 | *_p.c 71 | *_h.h 72 | *.ilk 73 | *.meta 74 | *.obj 75 | *.iobj 76 | *.pch 77 | *.pdb 78 | *.ipdb 79 | *.pgc 80 | *.pgd 81 | *.rsp 82 | *.sbr 83 | *.tlb 84 | *.tli 85 | *.tlh 86 | *.tmp 87 | *.tmp_proj 88 | *_wpftmp.csproj 89 | *.log 90 | *.vspscc 91 | *.vssscc 92 | .builds 93 | *.pidb 94 | *.svclog 95 | *.scc 96 | 97 | # Chutzpah Test files 98 | _Chutzpah* 99 | 100 | # Visual C++ cache files 101 | ipch/ 102 | *.aps 103 | *.ncb 104 | *.opendb 105 | *.opensdf 106 | *.sdf 107 | *.cachefile 108 | *.VC.db 109 | *.VC.VC.opendb 110 | 111 | # Visual Studio profiler 112 | *.psess 113 | *.vsp 114 | *.vspx 115 | *.sap 116 | 117 | # Visual Studio Trace Files 118 | *.e2e 119 | 120 | # TFS 2012 Local Workspace 121 | $tf/ 122 | 123 | # Guidance Automation Toolkit 124 | *.gpState 125 | 126 | # ReSharper is a .NET coding add-in 127 | _ReSharper*/ 128 | *.[Rr]e[Ss]harper 129 | *.DotSettings.user 130 | 131 | # JustCode is a .NET coding add-in 132 | .JustCode 133 | 134 | # TeamCity is a build add-in 135 | _TeamCity* 136 | 137 | # DotCover is a Code Coverage Tool 138 | *.dotCover 139 | 140 | # AxoCover is a Code Coverage Tool 141 | .axoCover/* 142 | !.axoCover/settings.json 143 | 144 | # Visual Studio code coverage results 145 | *.coverage 146 | *.coveragexml 147 | 148 | # NCrunch 149 | _NCrunch_* 150 | .*crunch*.local.xml 151 | nCrunchTemp_* 152 | 153 | # MightyMoose 154 | *.mm.* 155 | AutoTest.Net/ 156 | 157 | # Web workbench (sass) 158 | .sass-cache/ 159 | 160 | # Installshield output folder 161 | [Ee]xpress/ 162 | 163 | # DocProject is a documentation generator add-in 164 | DocProject/buildhelp/ 165 | DocProject/Help/*.HxT 166 | DocProject/Help/*.HxC 167 | DocProject/Help/*.hhc 168 | DocProject/Help/*.hhk 169 | DocProject/Help/*.hhp 170 | DocProject/Help/Html2 171 | DocProject/Help/html 172 | 173 | # Click-Once directory 174 | publish/ 175 | 176 | # Publish Web Output 177 | *.[Pp]ublish.xml 178 | *.azurePubxml 179 | # Note: Comment the next line if you want to checkin your web deploy settings, 180 | # but database connection strings (with potential passwords) will be unencrypted 181 | *.pubxml 182 | *.publishproj 183 | 184 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 185 | # checkin your Azure Web App publish settings, but sensitive information contained 186 | # in these scripts will be unencrypted 187 | PublishScripts/ 188 | 189 | # NuGet Packages 190 | *.nupkg 191 | # NuGet Symbol Packages 192 | *.snupkg 193 | # The packages folder can be ignored because of Package Restore 194 | **/[Pp]ackages/* 195 | # except build/, which is used as an MSBuild target. 196 | !**/[Pp]ackages/build/ 197 | # Uncomment if necessary however generally it will be regenerated when needed 198 | #!**/[Pp]ackages/repositories.config 199 | # NuGet v3's project.json files produces more ignorable files 200 | *.nuget.props 201 | *.nuget.targets 202 | 203 | # Microsoft Azure Build Output 204 | csx/ 205 | *.build.csdef 206 | 207 | # Microsoft Azure Emulator 208 | ecf/ 209 | rcf/ 210 | 211 | # Windows Store app package directories and files 212 | AppPackages/ 213 | BundleArtifacts/ 214 | Package.StoreAssociation.xml 215 | _pkginfo.txt 216 | *.appx 217 | *.appxbundle 218 | *.appxupload 219 | 220 | # Visual Studio cache files 221 | # files ending in .cache can be ignored 222 | *.[Cc]ache 223 | # but keep track of directories ending in .cache 224 | !?*.[Cc]ache/ 225 | 226 | # Others 227 | ClientBin/ 228 | ~$* 229 | *~ 230 | *.dbmdl 231 | *.dbproj.schemaview 232 | *.jfm 233 | *.pfx 234 | *.publishsettings 235 | orleans.codegen.cs 236 | 237 | # Including strong name files can present a security risk 238 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 239 | #*.snk 240 | 241 | # Since there are multiple workflows, uncomment next line to ignore bower_components 242 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 243 | #bower_components/ 244 | 245 | # RIA/Silverlight projects 246 | Generated_Code/ 247 | 248 | # Backup & report files from converting an old project file 249 | # to a newer Visual Studio version. Backup files are not needed, 250 | # because we have git ;-) 251 | _UpgradeReport_Files/ 252 | Backup*/ 253 | UpgradeLog*.XML 254 | UpgradeLog*.htm 255 | ServiceFabricBackup/ 256 | *.rptproj.bak 257 | 258 | # SQL Server files 259 | *.mdf 260 | *.ldf 261 | *.ndf 262 | 263 | # Business Intelligence projects 264 | *.rdl.data 265 | *.bim.layout 266 | *.bim_*.settings 267 | *.rptproj.rsuser 268 | *- [Bb]ackup.rdl 269 | *- [Bb]ackup ([0-9]).rdl 270 | *- [Bb]ackup ([0-9][0-9]).rdl 271 | 272 | # Microsoft Fakes 273 | FakesAssemblies/ 274 | 275 | # GhostDoc plugin setting file 276 | *.GhostDoc.xml 277 | 278 | # Node.js Tools for Visual Studio 279 | .ntvs_analysis.dat 280 | node_modules/ 281 | 282 | # Visual Studio 6 build log 283 | *.plg 284 | 285 | # Visual Studio 6 workspace options file 286 | *.opt 287 | 288 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 289 | *.vbw 290 | 291 | # Visual Studio LightSwitch build output 292 | **/*.HTMLClient/GeneratedArtifacts 293 | **/*.DesktopClient/GeneratedArtifacts 294 | **/*.DesktopClient/ModelManifest.xml 295 | **/*.Server/GeneratedArtifacts 296 | **/*.Server/ModelManifest.xml 297 | _Pvt_Extensions 298 | 299 | # Paket dependency manager 300 | .paket/paket.exe 301 | paket-files/ 302 | 303 | # FAKE - F# Make 304 | .fake/ 305 | 306 | # CodeRush personal settings 307 | .cr/personal 308 | 309 | # Python Tools for Visual Studio (PTVS) 310 | __pycache__/ 311 | *.pyc 312 | 313 | # Cake - Uncomment if you are using it 314 | # tools/** 315 | # !tools/packages.config 316 | 317 | # Tabs Studio 318 | *.tss 319 | 320 | # Telerik's JustMock configuration file 321 | *.jmconfig 322 | 323 | # BizTalk build output 324 | *.btp.cs 325 | *.btm.cs 326 | *.odx.cs 327 | *.xsd.cs 328 | 329 | # OpenCover UI analysis results 330 | OpenCover/ 331 | 332 | # Azure Stream Analytics local run output 333 | ASALocalRun/ 334 | 335 | # MSBuild Binary and Structured Log 336 | *.binlog 337 | 338 | # NVidia Nsight GPU debugger configuration file 339 | *.nvuser 340 | 341 | # MFractors (Xamarin productivity tool) working folder 342 | .mfractor/ 343 | 344 | # Local History for Visual Studio 345 | .localhistory/ 346 | 347 | # BeatPulse healthcheck temp database 348 | healthchecksdb 349 | 350 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 351 | MigrationBackup/ 352 | 353 | # Ionide (cross platform F# VS Code tools) working folder 354 | .ionide/ 355 | -------------------------------------------------------------------------------- /src/sample/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # JustCode is a .NET coding add-in 131 | .JustCode 132 | 133 | # TeamCity is a build add-in 134 | _TeamCity* 135 | 136 | # DotCover is a Code Coverage Tool 137 | *.dotCover 138 | 139 | # AxoCover is a Code Coverage Tool 140 | .axoCover/* 141 | !.axoCover/settings.json 142 | 143 | # Visual Studio code coverage results 144 | *.coverage 145 | *.coveragexml 146 | 147 | # NCrunch 148 | _NCrunch_* 149 | .*crunch*.local.xml 150 | nCrunchTemp_* 151 | 152 | # MightyMoose 153 | *.mm.* 154 | AutoTest.Net/ 155 | 156 | # Web workbench (sass) 157 | .sass-cache/ 158 | 159 | # Installshield output folder 160 | [Ee]xpress/ 161 | 162 | # DocProject is a documentation generator add-in 163 | DocProject/buildhelp/ 164 | DocProject/Help/*.HxT 165 | DocProject/Help/*.HxC 166 | DocProject/Help/*.hhc 167 | DocProject/Help/*.hhk 168 | DocProject/Help/*.hhp 169 | DocProject/Help/Html2 170 | DocProject/Help/html 171 | 172 | # Click-Once directory 173 | publish/ 174 | 175 | # Publish Web Output 176 | *.[Pp]ublish.xml 177 | *.azurePubxml 178 | # Note: Comment the next line if you want to checkin your web deploy settings, 179 | # but database connection strings (with potential passwords) will be unencrypted 180 | *.pubxml 181 | *.publishproj 182 | 183 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 184 | # checkin your Azure Web App publish settings, but sensitive information contained 185 | # in these scripts will be unencrypted 186 | PublishScripts/ 187 | 188 | # NuGet Packages 189 | *.nupkg 190 | # NuGet Symbol Packages 191 | *.snupkg 192 | # The packages folder can be ignored because of Package Restore 193 | **/[Pp]ackages/* 194 | # except build/, which is used as an MSBuild target. 195 | !**/[Pp]ackages/build/ 196 | # Uncomment if necessary however generally it will be regenerated when needed 197 | #!**/[Pp]ackages/repositories.config 198 | # NuGet v3's project.json files produces more ignorable files 199 | *.nuget.props 200 | *.nuget.targets 201 | 202 | # Microsoft Azure Build Output 203 | csx/ 204 | *.build.csdef 205 | 206 | # Microsoft Azure Emulator 207 | ecf/ 208 | rcf/ 209 | 210 | # Windows Store app package directories and files 211 | AppPackages/ 212 | BundleArtifacts/ 213 | Package.StoreAssociation.xml 214 | _pkginfo.txt 215 | *.appx 216 | *.appxbundle 217 | *.appxupload 218 | 219 | # Visual Studio cache files 220 | # files ending in .cache can be ignored 221 | *.[Cc]ache 222 | # but keep track of directories ending in .cache 223 | !?*.[Cc]ache/ 224 | 225 | # Others 226 | ClientBin/ 227 | ~$* 228 | *~ 229 | *.dbmdl 230 | *.dbproj.schemaview 231 | *.jfm 232 | *.pfx 233 | *.publishsettings 234 | orleans.codegen.cs 235 | 236 | # Including strong name files can present a security risk 237 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 238 | #*.snk 239 | 240 | # Since there are multiple workflows, uncomment next line to ignore bower_components 241 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 242 | #bower_components/ 243 | 244 | # RIA/Silverlight projects 245 | Generated_Code/ 246 | 247 | # Backup & report files from converting an old project file 248 | # to a newer Visual Studio version. Backup files are not needed, 249 | # because we have git ;-) 250 | _UpgradeReport_Files/ 251 | Backup*/ 252 | UpgradeLog*.XML 253 | UpgradeLog*.htm 254 | ServiceFabricBackup/ 255 | *.rptproj.bak 256 | 257 | # SQL Server files 258 | *.mdf 259 | *.ldf 260 | *.ndf 261 | 262 | # Business Intelligence projects 263 | *.rdl.data 264 | *.bim.layout 265 | *.bim_*.settings 266 | *.rptproj.rsuser 267 | *- [Bb]ackup.rdl 268 | *- [Bb]ackup ([0-9]).rdl 269 | *- [Bb]ackup ([0-9][0-9]).rdl 270 | 271 | # Microsoft Fakes 272 | FakesAssemblies/ 273 | 274 | # GhostDoc plugin setting file 275 | *.GhostDoc.xml 276 | 277 | # Node.js Tools for Visual Studio 278 | .ntvs_analysis.dat 279 | node_modules/ 280 | 281 | # Visual Studio 6 build log 282 | *.plg 283 | 284 | # Visual Studio 6 workspace options file 285 | *.opt 286 | 287 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 288 | *.vbw 289 | 290 | # Visual Studio LightSwitch build output 291 | **/*.HTMLClient/GeneratedArtifacts 292 | **/*.DesktopClient/GeneratedArtifacts 293 | **/*.DesktopClient/ModelManifest.xml 294 | **/*.Server/GeneratedArtifacts 295 | **/*.Server/ModelManifest.xml 296 | _Pvt_Extensions 297 | 298 | # Paket dependency manager 299 | .paket/paket.exe 300 | paket-files/ 301 | 302 | # FAKE - F# Make 303 | .fake/ 304 | 305 | # CodeRush personal settings 306 | .cr/personal 307 | 308 | # Python Tools for Visual Studio (PTVS) 309 | __pycache__/ 310 | *.pyc 311 | 312 | # Cake - Uncomment if you are using it 313 | # tools/** 314 | # !tools/packages.config 315 | 316 | # Tabs Studio 317 | *.tss 318 | 319 | # Telerik's JustMock configuration file 320 | *.jmconfig 321 | 322 | # BizTalk build output 323 | *.btp.cs 324 | *.btm.cs 325 | *.odx.cs 326 | *.xsd.cs 327 | 328 | # OpenCover UI analysis results 329 | OpenCover/ 330 | 331 | # Azure Stream Analytics local run output 332 | ASALocalRun/ 333 | 334 | # MSBuild Binary and Structured Log 335 | *.binlog 336 | 337 | # NVidia Nsight GPU debugger configuration file 338 | *.nvuser 339 | 340 | # MFractors (Xamarin productivity tool) working folder 341 | .mfractor/ 342 | 343 | # Local History for Visual Studio 344 | .localhistory/ 345 | 346 | # BeatPulse healthcheck temp database 347 | healthchecksdb 348 | 349 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 350 | MigrationBackup/ 351 | 352 | # Ionide (cross platform F# VS Code tools) working folder 353 | .ionide/ 354 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | *.exe 19 | 20 | # Build results 21 | [Dd]ebug/ 22 | [Dd]ebugPublic/ 23 | [Rr]elease/ 24 | [Rr]eleases/ 25 | x64/ 26 | x86/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # StyleCop 66 | StyleCopReport.xml 67 | 68 | # Files built by Visual Studio 69 | *_i.c 70 | *_p.c 71 | *_h.h 72 | *.ilk 73 | *.meta 74 | *.obj 75 | *.iobj 76 | *.pch 77 | *.pdb 78 | *.ipdb 79 | *.pgc 80 | *.pgd 81 | *.rsp 82 | *.sbr 83 | *.tlb 84 | *.tli 85 | *.tlh 86 | *.tmp 87 | *.tmp_proj 88 | *_wpftmp.csproj 89 | *.log 90 | *.vspscc 91 | *.vssscc 92 | .builds 93 | *.pidb 94 | *.svclog 95 | *.scc 96 | 97 | # Chutzpah Test files 98 | _Chutzpah* 99 | 100 | # Visual C++ cache files 101 | ipch/ 102 | *.aps 103 | *.ncb 104 | *.opendb 105 | *.opensdf 106 | *.sdf 107 | *.cachefile 108 | *.VC.db 109 | *.VC.VC.opendb 110 | 111 | # Visual Studio profiler 112 | *.psess 113 | *.vsp 114 | *.vspx 115 | *.sap 116 | 117 | # Visual Studio Trace Files 118 | *.e2e 119 | 120 | # TFS 2012 Local Workspace 121 | $tf/ 122 | 123 | # Guidance Automation Toolkit 124 | *.gpState 125 | 126 | # ReSharper is a .NET coding add-in 127 | _ReSharper*/ 128 | *.[Rr]e[Ss]harper 129 | *.DotSettings.user 130 | 131 | # JustCode is a .NET coding add-in 132 | .JustCode 133 | 134 | # TeamCity is a build add-in 135 | _TeamCity* 136 | 137 | # DotCover is a Code Coverage Tool 138 | *.dotCover 139 | 140 | # AxoCover is a Code Coverage Tool 141 | .axoCover/* 142 | !.axoCover/settings.json 143 | 144 | # Visual Studio code coverage results 145 | *.coverage 146 | *.coveragexml 147 | 148 | # NCrunch 149 | _NCrunch_* 150 | .*crunch*.local.xml 151 | nCrunchTemp_* 152 | 153 | # MightyMoose 154 | *.mm.* 155 | AutoTest.Net/ 156 | 157 | # Web workbench (sass) 158 | .sass-cache/ 159 | 160 | # Installshield output folder 161 | [Ee]xpress/ 162 | 163 | # DocProject is a documentation generator add-in 164 | DocProject/buildhelp/ 165 | DocProject/Help/*.HxT 166 | DocProject/Help/*.HxC 167 | DocProject/Help/*.hhc 168 | DocProject/Help/*.hhk 169 | DocProject/Help/*.hhp 170 | DocProject/Help/Html2 171 | DocProject/Help/html 172 | 173 | # Click-Once directory 174 | publish/ 175 | 176 | # Publish Web Output 177 | *.[Pp]ublish.xml 178 | *.azurePubxml 179 | # Note: Comment the next line if you want to checkin your web deploy settings, 180 | # but database connection strings (with potential passwords) will be unencrypted 181 | *.pubxml 182 | *.publishproj 183 | 184 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 185 | # checkin your Azure Web App publish settings, but sensitive information contained 186 | # in these scripts will be unencrypted 187 | PublishScripts/ 188 | 189 | # NuGet Packages 190 | *.nupkg 191 | # NuGet Symbol Packages 192 | *.snupkg 193 | # The packages folder can be ignored because of Package Restore 194 | **/[Pp]ackages/* 195 | # except build/, which is used as an MSBuild target. 196 | !**/[Pp]ackages/build/ 197 | # Uncomment if necessary however generally it will be regenerated when needed 198 | #!**/[Pp]ackages/repositories.config 199 | # NuGet v3's project.json files produces more ignorable files 200 | *.nuget.props 201 | *.nuget.targets 202 | 203 | # Microsoft Azure Build Output 204 | csx/ 205 | *.build.csdef 206 | 207 | # Microsoft Azure Emulator 208 | ecf/ 209 | rcf/ 210 | 211 | # Windows Store app package directories and files 212 | AppPackages/ 213 | BundleArtifacts/ 214 | Package.StoreAssociation.xml 215 | _pkginfo.txt 216 | *.appx 217 | *.appxbundle 218 | *.appxupload 219 | 220 | # Visual Studio cache files 221 | # files ending in .cache can be ignored 222 | *.[Cc]ache 223 | # but keep track of directories ending in .cache 224 | !?*.[Cc]ache/ 225 | 226 | # Others 227 | ClientBin/ 228 | ~$* 229 | *~ 230 | *.dbmdl 231 | *.dbproj.schemaview 232 | *.jfm 233 | *.pfx 234 | *.publishsettings 235 | orleans.codegen.cs 236 | 237 | # Including strong name files can present a security risk 238 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 239 | #*.snk 240 | 241 | # Since there are multiple workflows, uncomment next line to ignore bower_components 242 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 243 | #bower_components/ 244 | 245 | # RIA/Silverlight projects 246 | Generated_Code/ 247 | 248 | # Backup & report files from converting an old project file 249 | # to a newer Visual Studio version. Backup files are not needed, 250 | # because we have git ;-) 251 | _UpgradeReport_Files/ 252 | Backup*/ 253 | UpgradeLog*.XML 254 | UpgradeLog*.htm 255 | ServiceFabricBackup/ 256 | *.rptproj.bak 257 | 258 | # SQL Server files 259 | *.mdf 260 | *.ldf 261 | *.ndf 262 | 263 | # Business Intelligence projects 264 | *.rdl.data 265 | *.bim.layout 266 | *.bim_*.settings 267 | *.rptproj.rsuser 268 | *- [Bb]ackup.rdl 269 | *- [Bb]ackup ([0-9]).rdl 270 | *- [Bb]ackup ([0-9][0-9]).rdl 271 | 272 | # Microsoft Fakes 273 | FakesAssemblies/ 274 | 275 | # GhostDoc plugin setting file 276 | *.GhostDoc.xml 277 | 278 | # Node.js Tools for Visual Studio 279 | .ntvs_analysis.dat 280 | node_modules/ 281 | 282 | # Visual Studio 6 build log 283 | *.plg 284 | 285 | # Visual Studio 6 workspace options file 286 | *.opt 287 | 288 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 289 | *.vbw 290 | 291 | # Visual Studio LightSwitch build output 292 | **/*.HTMLClient/GeneratedArtifacts 293 | **/*.DesktopClient/GeneratedArtifacts 294 | **/*.DesktopClient/ModelManifest.xml 295 | **/*.Server/GeneratedArtifacts 296 | **/*.Server/ModelManifest.xml 297 | _Pvt_Extensions 298 | 299 | # Paket dependency manager 300 | .paket/paket.exe 301 | paket-files/ 302 | 303 | # FAKE - F# Make 304 | .fake/ 305 | 306 | # CodeRush personal settings 307 | .cr/personal 308 | 309 | # Python Tools for Visual Studio (PTVS) 310 | __pycache__/ 311 | *.pyc 312 | 313 | # Cake - Uncomment if you are using it 314 | # tools/** 315 | # !tools/packages.config 316 | 317 | # Tabs Studio 318 | *.tss 319 | 320 | # Telerik's JustMock configuration file 321 | *.jmconfig 322 | 323 | # BizTalk build output 324 | *.btp.cs 325 | *.btm.cs 326 | *.odx.cs 327 | *.xsd.cs 328 | 329 | # OpenCover UI analysis results 330 | OpenCover/ 331 | 332 | # Azure Stream Analytics local run output 333 | ASALocalRun/ 334 | 335 | # MSBuild Binary and Structured Log 336 | *.binlog 337 | 338 | # NVidia Nsight GPU debugger configuration file 339 | *.nvuser 340 | 341 | # MFractors (Xamarin productivity tool) working folder 342 | .mfractor/ 343 | 344 | # Local History for Visual Studio 345 | .localhistory/ 346 | 347 | # BeatPulse healthcheck temp database 348 | healthchecksdb 349 | 350 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 351 | MigrationBackup/ 352 | 353 | # Ionide (cross platform F# VS Code tools) working folder 354 | .ionide/ 355 | -------------------------------------------------------------------------------- /src/sample/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\BackActive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Resources\BookmarksActive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Resources\Border.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Resources\ButtonHoverBackground.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | ..\Resources\CloseActive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | 137 | ..\Resources\ForwardActive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 138 | 139 | 140 | ..\Resources\ToolbarBackground.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 141 | 142 | 143 | ..\Resources\ToolsActive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 144 | 145 | -------------------------------------------------------------------------------- /src/sample/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | Resources\BackActive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | Resources\BookmarksActive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | Resources\Border.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | Resources\ButtonHoverBackground.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | Resources\CloseActive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | 137 | Resources\DefaultIcon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 138 | 139 | 140 | Resources\ForwardActive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 141 | 142 | 143 | Resources\ToolbarBackground.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 144 | 145 | 146 | Resources\ToolsActive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 147 | 148 | -------------------------------------------------------------------------------- /src/sample/BrowserForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MdiTabCtrlSample 2 | { 3 | partial class BrowserForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BrowserForm)); 32 | this.toolbarBackground = new System.Windows.Forms.Panel(); 33 | this.forwardButton = new System.Windows.Forms.PictureBox(); 34 | this.backButton = new System.Windows.Forms.PictureBox(); 35 | this.urlTextBox = new System.Windows.Forms.TextBox(); 36 | this.urlBorder = new System.Windows.Forms.Panel(); 37 | this.urlBackground = new System.Windows.Forms.Panel(); 38 | this.webBrowser = new System.Windows.Forms.WebBrowser(); 39 | this.toolbarBackground.SuspendLayout(); 40 | ((System.ComponentModel.ISupportInitialize)(this.forwardButton)).BeginInit(); 41 | ((System.ComponentModel.ISupportInitialize)(this.backButton)).BeginInit(); 42 | this.urlBorder.SuspendLayout(); 43 | this.SuspendLayout(); 44 | // 45 | // toolbarBackground 46 | // 47 | this.toolbarBackground.BackgroundImage = global::MdiTabCtrlSample.Resources.ToolbarBackground; 48 | this.toolbarBackground.Controls.Add(this.forwardButton); 49 | this.toolbarBackground.Controls.Add(this.backButton); 50 | this.toolbarBackground.Controls.Add(this.urlTextBox); 51 | this.toolbarBackground.Controls.Add(this.urlBorder); 52 | this.toolbarBackground.Dock = System.Windows.Forms.DockStyle.Top; 53 | this.toolbarBackground.Location = new System.Drawing.Point(0, 0); 54 | this.toolbarBackground.Name = "toolbarBackground"; 55 | this.toolbarBackground.Size = new System.Drawing.Size(686, 36); 56 | this.toolbarBackground.TabIndex = 2; 57 | // 58 | // forwardButton 59 | // 60 | this.forwardButton.BackColor = System.Drawing.Color.Transparent; 61 | this.forwardButton.Image = global::MdiTabCtrlSample.Resources.ForwardActive; 62 | this.forwardButton.Location = new System.Drawing.Point(37, 5); 63 | this.forwardButton.Margin = new System.Windows.Forms.Padding(4, 4, 3, 3); 64 | this.forwardButton.Name = "forwardButton"; 65 | this.forwardButton.Size = new System.Drawing.Size(27, 27); 66 | this.forwardButton.TabIndex = 3; 67 | this.forwardButton.TabStop = false; 68 | this.forwardButton.Click += new System.EventHandler(this.forwardButton_Click); 69 | this.forwardButton.MouseEnter += new System.EventHandler(this.forwardButton_MouseEnter); 70 | this.forwardButton.MouseLeave += new System.EventHandler(this.forwardButton_MouseLeave); 71 | // 72 | // backButton 73 | // 74 | this.backButton.BackColor = System.Drawing.Color.Transparent; 75 | this.backButton.Image = global::MdiTabCtrlSample.Resources.BackActive; 76 | this.backButton.Location = new System.Drawing.Point(6, 5); 77 | this.backButton.Margin = new System.Windows.Forms.Padding(4, 4, 3, 3); 78 | this.backButton.Name = "backButton"; 79 | this.backButton.Size = new System.Drawing.Size(27, 27); 80 | this.backButton.TabIndex = 2; 81 | this.backButton.TabStop = false; 82 | this.backButton.Click += new System.EventHandler(this.backButton_Click); 83 | this.backButton.MouseEnter += new System.EventHandler(this.backButton_MouseEnter); 84 | this.backButton.MouseLeave += new System.EventHandler(this.backButton_MouseLeave); 85 | // 86 | // urlTextBox 87 | // 88 | this.urlTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 89 | | System.Windows.Forms.AnchorStyles.Right))); 90 | this.urlTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; 91 | this.urlTextBox.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 92 | this.urlTextBox.Location = new System.Drawing.Point(79, 8); 93 | this.urlTextBox.Margin = new System.Windows.Forms.Padding(9); 94 | this.urlTextBox.Name = "urlTextBox"; 95 | this.urlTextBox.Size = new System.Drawing.Size(591, 19); 96 | this.urlTextBox.TabIndex = 0; 97 | this.urlTextBox.Text = "about:blank"; 98 | this.urlTextBox.WordWrap = false; 99 | this.urlTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.urlTextBox_KeyDown); 100 | // 101 | // urlBorder 102 | // 103 | this.urlBorder.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 104 | | System.Windows.Forms.AnchorStyles.Right))); 105 | this.urlBorder.BackColor = System.Drawing.Color.Silver; 106 | this.urlBorder.Controls.Add(this.urlBackground); 107 | this.urlBorder.ForeColor = System.Drawing.Color.Silver; 108 | this.urlBorder.Location = new System.Drawing.Point(69, 5); 109 | this.urlBorder.Name = "urlBorder"; 110 | this.urlBorder.Size = new System.Drawing.Size(613, 26); 111 | this.urlBorder.TabIndex = 1; 112 | // 113 | // urlBackground 114 | // 115 | this.urlBackground.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 116 | | System.Windows.Forms.AnchorStyles.Right))); 117 | this.urlBackground.BackColor = System.Drawing.Color.White; 118 | this.urlBackground.ForeColor = System.Drawing.Color.Silver; 119 | this.urlBackground.Location = new System.Drawing.Point(1, 1); 120 | this.urlBackground.Name = "urlBackground"; 121 | this.urlBackground.Size = new System.Drawing.Size(611, 24); 122 | this.urlBackground.TabIndex = 2; 123 | // 124 | // webBrowser 125 | // 126 | this.webBrowser.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 127 | | System.Windows.Forms.AnchorStyles.Left) 128 | | System.Windows.Forms.AnchorStyles.Right))); 129 | this.webBrowser.Location = new System.Drawing.Point(0, 36); 130 | this.webBrowser.MinimumSize = new System.Drawing.Size(20, 20); 131 | this.webBrowser.Name = "webBrowser"; 132 | this.webBrowser.Size = new System.Drawing.Size(686, 408); 133 | this.webBrowser.TabIndex = 6; 134 | // 135 | // BrowserForm 136 | // 137 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 138 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 139 | this.BackColor = System.Drawing.Color.White; 140 | this.ClientSize = new System.Drawing.Size(686, 444); 141 | this.Controls.Add(this.webBrowser); 142 | this.Controls.Add(this.toolbarBackground); 143 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 144 | this.Name = "BrowserForm"; 145 | this.Text = "BrowserForm"; 146 | this.toolbarBackground.ResumeLayout(false); 147 | this.toolbarBackground.PerformLayout(); 148 | ((System.ComponentModel.ISupportInitialize)(this.forwardButton)).EndInit(); 149 | ((System.ComponentModel.ISupportInitialize)(this.backButton)).EndInit(); 150 | this.urlBorder.ResumeLayout(false); 151 | this.ResumeLayout(false); 152 | 153 | } 154 | 155 | #endregion 156 | 157 | private System.Windows.Forms.Panel toolbarBackground; 158 | private System.Windows.Forms.TextBox urlTextBox; 159 | private System.Windows.Forms.Panel urlBorder; 160 | private System.Windows.Forms.Panel urlBackground; 161 | private System.Windows.Forms.PictureBox backButton; 162 | private System.Windows.Forms.WebBrowser webBrowser; 163 | private System.Windows.Forms.PictureBox forwardButton; 164 | } 165 | } -------------------------------------------------------------------------------- /src/TabPage.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel 2 | Imports System.Drawing.Drawing2D 3 | 4 | _ 5 | Public Class TabPage 6 | 7 | Private m_BackHighColor As Color 8 | Private m_BackHighColorDisabled As Color 9 | Private m_BackLowColor As Color 10 | Private m_BackLowColorDisabled As Color 11 | Private m_BorderColor As Color 12 | Private m_BorderColorDisabled As Color 13 | Private m_ForeColorDisabled As Color 14 | Private m_Selected As Boolean = False 15 | Private m_Hot As Boolean = False 16 | Private m_MaximumWidth As Integer 17 | Private m_MinimumWidth As Integer 18 | Private m_PadLeft As Integer 19 | Private m_PadRight As Integer 20 | Private m_CloseButtonVisible As Boolean 21 | Private m_CloseButton As Image 22 | Private m_CloseButtonImageHot As Image 23 | Private m_CloseButtonImageDisabled As Image 24 | Private m_CloseButtonBackHighColor As Color 25 | Private m_CloseButtonBackLowColor As Color 26 | Private m_CloseButtonBorderColor As Color 27 | Private m_CloseButtonForeColor As Color 28 | Private m_CloseButtonBackHighColorDisabled As Color 29 | Private m_CloseButtonBackLowColorDisabled As Color 30 | Private m_CloseButtonBorderColorDisabled As Color 31 | Private m_CloseButtonForeColorDisabled As Color 32 | Private m_CloseButtonBackHighColorHot As Color 33 | Private m_CloseButtonBackLowColorHot As Color 34 | Private m_CloseButtonBorderColorHot As Color 35 | Private m_CloseButtonForeColorHot As Color 36 | Private m_HotTrack As Boolean 37 | Private m_CloseButtonSize As Size 38 | Private m_FontBoldOnSelect As Boolean 39 | Private m_IconSize As Size 40 | Private m_SmoothingMode As SmoothingMode 41 | Private m_Alignment As TabControl.TabAlignment 42 | Private m_GlassGradient As Boolean 43 | Private m_BorderEnhanced As Boolean 44 | Private m_RenderMode As ToolStripRenderMode 45 | Private m_BorderEnhanceWeight As TabControl.Weight 46 | 47 | Friend WithEvents m_Form As Form 48 | Friend TabVisible As Boolean 49 | Friend TabLeft As Integer 50 | Friend MenuItem As New ToolStripMenuItem 51 | 52 | Private MouseOverCloseButton As Boolean = False 53 | 54 | _ 55 | Public Shadows Event Click(ByVal sender As Object, ByVal e As EventArgs) 56 | Friend Event Close(ByVal sender As Object, ByVal e As EventArgs) 57 | Friend Event GetTabRegion(ByVal sender As Object, ByVal e As TabControl.GetTabRegionEventArgs) 58 | Friend Event TabPaintBackground(ByVal sender As Object, ByVal e As TabControl.TabPaintEventArgs) 59 | Friend Event TabPaintBorder(ByVal sender As Object, ByVal e As TabControl.TabPaintEventArgs) 60 | Friend Event Dragging(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) 61 | Friend Event EndDrag(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) 62 | Friend Event EnterForm As EventHandler 63 | Friend Event LeaveForm As EventHandler 64 | 65 | Sub New(ByVal Form As System.Windows.Forms.Form) 66 | ' This call is required by the Windows Form Designer. 67 | InitializeComponent() 68 | ' Add any initialization after the InitializeComponent() call. 69 | Me.SuspendLayout() 70 | Me.SetStyle(ControlStyles.DoubleBuffer, True) 71 | Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True) 72 | Me.SetStyle(ControlStyles.UserPaint, True) 73 | Me.SetStyle(ControlStyles.SupportsTransparentBackColor, True) 74 | MyBase.BackColor = Color.Transparent 75 | Me.Visible = False 76 | Me.Size = New System.Drawing.Size(1, 1) 77 | Form.TopLevel = False 78 | Form.MdiParent = Nothing 79 | Form.FormBorderStyle = Windows.Forms.FormBorderStyle.None 80 | Form.Dock = DockStyle.Fill 81 | Me.m_Form = Form 82 | MenuItem.Text = Form.Text 83 | MenuItem.Image = Form.Icon.ToBitmap 84 | MenuItem.Tag = Me 85 | Me.ResumeLayout(False) 86 | End Sub 87 | 88 | _ 89 | Public ReadOnly Property Form() As Object 90 | Get 91 | Return m_Form 92 | End Get 93 | End Property 94 | 95 | _ 96 | Public Property BackHighColor() As Color 97 | Get 98 | Return m_BackHighColor 99 | End Get 100 | Set(ByVal value As Color) 101 | m_BackHighColor = value 102 | Invalidate() 103 | End Set 104 | End Property 105 | 106 | _ 107 | Public Property BackLowColor() As Color 108 | Get 109 | Return m_BackLowColor 110 | End Get 111 | Set(ByVal value As Color) 112 | m_BackLowColor = value 113 | Invalidate() 114 | End Set 115 | End Property 116 | 117 | _ 118 | Friend Property BorderColor() As Color 119 | Get 120 | Return m_BorderColor 121 | End Get 122 | Set(ByVal value As Color) 123 | m_BorderColor = value 124 | Invalidate() 125 | End Set 126 | End Property 127 | 128 | _ 129 | Public Property BackHighColorDisabled() As Color 130 | Get 131 | Return m_BackHighColorDisabled 132 | End Get 133 | Set(ByVal value As Color) 134 | m_BackHighColorDisabled = value 135 | Invalidate() 136 | End Set 137 | End Property 138 | 139 | _ 140 | Public Property BackLowColorDisabled() As Color 141 | Get 142 | Return m_BackLowColorDisabled 143 | End Get 144 | Set(ByVal value As Color) 145 | m_BackLowColorDisabled = value 146 | Invalidate() 147 | End Set 148 | End Property 149 | 150 | _ 151 | Public Property BorderColorDisabled() As Color 152 | Get 153 | Return m_BorderColorDisabled 154 | End Get 155 | Set(ByVal value As Color) 156 | m_BorderColorDisabled = value 157 | Invalidate() 158 | End Set 159 | End Property 160 | 161 | _ 162 | Public Property ForeColorDisabled() As Color 163 | Get 164 | Return m_ForeColorDisabled 165 | End Get 166 | Set(ByVal value As Color) 167 | m_ForeColorDisabled = value 168 | Invalidate() 169 | End Set 170 | End Property 171 | 172 | Friend Property IsSelected() As Boolean 173 | Get 174 | Return m_Selected 175 | End Get 176 | Set(ByVal Value As Boolean) 177 | If m_Selected <> Value Then 178 | m_Selected = Value 179 | If m_Selected Then 180 | m_Hot = False 181 | End If 182 | Invalidate() 183 | End If 184 | End Set 185 | End Property 186 | 187 | _ 188 | Public ReadOnly Property Selected() As Boolean 189 | Get 190 | Return IsSelected 191 | End Get 192 | End Property 193 | 194 | Friend Property MaximumWidth() As Integer 195 | Get 196 | Return m_MaximumWidth 197 | End Get 198 | Set(ByVal value As Integer) 199 | m_MaximumWidth = value 200 | CalculateWidth() 201 | Invalidate() 202 | End Set 203 | End Property 204 | 205 | Friend Property MinimumWidth() As Integer 206 | Get 207 | Return m_MinimumWidth 208 | End Get 209 | Set(ByVal value As Integer) 210 | m_MinimumWidth = value 211 | CalculateWidth() 212 | Invalidate() 213 | End Set 214 | End Property 215 | 216 | Friend Property PadLeft() As Integer 217 | Get 218 | Return m_PadLeft 219 | End Get 220 | Set(ByVal value As Integer) 221 | m_PadLeft = value 222 | CalculateWidth() 223 | Invalidate() 224 | End Set 225 | End Property 226 | 227 | Friend Property PadRight() As Integer 228 | Get 229 | Return m_PadRight 230 | End Get 231 | Set(ByVal value As Integer) 232 | m_PadRight = value 233 | CalculateWidth() 234 | Invalidate() 235 | End Set 236 | End Property 237 | 238 | _ 239 | Public Property CloseButtonVisible() As Boolean 240 | Get 241 | Return m_CloseButtonVisible 242 | End Get 243 | Set(ByVal value As Boolean) 244 | If m_CloseButtonVisible <> value Then 245 | m_CloseButtonVisible = value 246 | CalculateWidth() 247 | Invalidate() 248 | End If 249 | End Set 250 | End Property 251 | 252 | Public Property CloseButtonImage() As Image 253 | Get 254 | Return m_CloseButton 255 | End Get 256 | Set(ByVal value As Image) 257 | m_CloseButton = value 258 | Invalidate() 259 | End Set 260 | End Property 261 | 262 | Public Property CloseButtonImageHot() As Image 263 | Get 264 | Return m_CloseButtonImageHot 265 | End Get 266 | Set(ByVal value As Image) 267 | m_CloseButtonImageHot = value 268 | Invalidate() 269 | End Set 270 | End Property 271 | 272 | Public Property CloseButtonImageDisabled() As Image 273 | Get 274 | Return m_CloseButtonImageDisabled 275 | End Get 276 | Set(ByVal value As Image) 277 | m_CloseButtonImageDisabled = value 278 | Invalidate() 279 | End Set 280 | End Property 281 | 282 | Public Property CloseButtonBackHighColor() As System.Drawing.Color 283 | Get 284 | Return m_CloseButtonBackHighColor 285 | End Get 286 | Set(ByVal Value As Color) 287 | m_CloseButtonBackHighColor = Value 288 | End Set 289 | End Property 290 | 291 | Public Property CloseButtonBackLowColor() As System.Drawing.Color 292 | Get 293 | Return m_CloseButtonBackLowColor 294 | End Get 295 | Set(ByVal Value As Color) 296 | m_CloseButtonBackLowColor = Value 297 | End Set 298 | End Property 299 | 300 | Public Property CloseButtonBorderColor() As System.Drawing.Color 301 | Get 302 | Return m_CloseButtonBorderColor 303 | End Get 304 | Set(ByVal Value As Color) 305 | m_CloseButtonBorderColor = Value 306 | End Set 307 | End Property 308 | 309 | Public Property CloseButtonForeColor() As System.Drawing.Color 310 | Get 311 | Return m_CloseButtonForeColor 312 | End Get 313 | Set(ByVal Value As Color) 314 | m_CloseButtonForeColor = Value 315 | End Set 316 | End Property 317 | 318 | Public Property CloseButtonBackHighColorDisabled() As System.Drawing.Color 319 | Get 320 | Return m_CloseButtonBackHighColorDisabled 321 | End Get 322 | Set(ByVal Value As Color) 323 | m_CloseButtonBackHighColorDisabled = Value 324 | End Set 325 | End Property 326 | 327 | Public Property CloseButtonBackLowColorDisabled() As System.Drawing.Color 328 | Get 329 | Return m_CloseButtonBackLowColorDisabled 330 | End Get 331 | Set(ByVal Value As Color) 332 | m_CloseButtonBackLowColorDisabled = Value 333 | End Set 334 | End Property 335 | 336 | Public Property CloseButtonBorderColorDisabled() As System.Drawing.Color 337 | Get 338 | Return m_CloseButtonBorderColorDisabled 339 | End Get 340 | Set(ByVal Value As Color) 341 | m_CloseButtonBorderColorDisabled = Value 342 | End Set 343 | End Property 344 | 345 | Public Property CloseButtonForeColorDisabled() As System.Drawing.Color 346 | Get 347 | Return m_CloseButtonForeColorDisabled 348 | End Get 349 | Set(ByVal Value As Color) 350 | m_CloseButtonForeColorDisabled = Value 351 | End Set 352 | End Property 353 | 354 | Public Property CloseButtonBackHighColorHot() As System.Drawing.Color 355 | Get 356 | Return m_CloseButtonBackHighColorHot 357 | End Get 358 | Set(ByVal Value As Color) 359 | m_CloseButtonBackHighColorHot = Value 360 | End Set 361 | End Property 362 | 363 | Public Property CloseButtonBackLowColorHot() As System.Drawing.Color 364 | Get 365 | Return m_CloseButtonBackLowColorHot 366 | End Get 367 | Set(ByVal Value As Color) 368 | m_CloseButtonBackLowColorHot = Value 369 | End Set 370 | End Property 371 | 372 | Public Property CloseButtonBorderColorHot() As System.Drawing.Color 373 | Get 374 | Return m_CloseButtonBorderColorHot 375 | End Get 376 | Set(ByVal Value As Color) 377 | m_CloseButtonBorderColorHot = Value 378 | End Set 379 | End Property 380 | 381 | Public Property CloseButtonForeColorHot() As System.Drawing.Color 382 | Get 383 | Return m_CloseButtonForeColorHot 384 | End Get 385 | Set(ByVal Value As Color) 386 | m_CloseButtonForeColorHot = Value 387 | End Set 388 | End Property 389 | 390 | Friend Property HotTrack() As Boolean 391 | Get 392 | Return m_HotTrack 393 | End Get 394 | Set(ByVal value As Boolean) 395 | m_HotTrack = value 396 | Invalidate() 397 | End Set 398 | End Property 399 | 400 | Friend Property CloseButtonSize() As Size 401 | Get 402 | Return m_CloseButtonSize 403 | End Get 404 | Set(ByVal value As Size) 405 | m_CloseButtonSize = value 406 | CalculateWidth() 407 | Invalidate() 408 | End Set 409 | End Property 410 | 411 | Friend Property FontBoldOnSelect() As Boolean 412 | Get 413 | Return m_FontBoldOnSelect 414 | End Get 415 | Set(ByVal value As Boolean) 416 | m_FontBoldOnSelect = value 417 | CalculateWidth() 418 | Invalidate() 419 | End Set 420 | End Property 421 | 422 | Friend Property IconSize() As Size 423 | Get 424 | Return m_IconSize 425 | End Get 426 | Set(ByVal value As Size) 427 | m_IconSize = value 428 | CalculateWidth() 429 | Invalidate() 430 | End Set 431 | End Property 432 | 433 | Friend Property SmoothingMode() As SmoothingMode 434 | Get 435 | Return m_SmoothingMode 436 | End Get 437 | Set(ByVal value As SmoothingMode) 438 | m_SmoothingMode = value 439 | Invalidate() 440 | End Set 441 | End Property 442 | 443 | Friend Property Alignment() As TabControl.TabAlignment 444 | Get 445 | Return m_Alignment 446 | End Get 447 | Set(ByVal value As TabControl.TabAlignment) 448 | m_Alignment = value 449 | Invalidate() 450 | End Set 451 | End Property 452 | 453 | Friend Property GlassGradient() As Boolean 454 | Get 455 | Return m_GlassGradient 456 | End Get 457 | Set(ByVal value As Boolean) 458 | m_GlassGradient = value 459 | End Set 460 | End Property 461 | 462 | Friend Property BorderEnhanced() As Boolean 463 | Get 464 | Return m_BorderEnhanced 465 | End Get 466 | Set(ByVal value As Boolean) 467 | m_BorderEnhanced = value 468 | End Set 469 | End Property 470 | 471 | Friend Property RenderMode() As ToolStripRenderMode 472 | Get 473 | Return m_RenderMode 474 | End Get 475 | Set(ByVal value As ToolStripRenderMode) 476 | m_RenderMode = value 477 | Invalidate() 478 | End Set 479 | End Property 480 | 481 | Friend Property BorderEnhanceWeight() As TabControl.Weight 482 | Get 483 | Return m_BorderEnhanceWeight 484 | End Get 485 | Set(ByVal value As TabControl.Weight) 486 | m_BorderEnhanceWeight = value 487 | End Set 488 | End Property 489 | 490 | Public Property Icon() As Icon 491 | Get 492 | Return m_Form.Icon 493 | End Get 494 | Set(ByVal value As Icon) 495 | m_Form.Icon = value 496 | Dim r As New Region(New Rectangle(PadLeft, (Me.Height / 2 - m_IconSize.Height / 2), m_IconSize.Width, m_IconSize.Height)) 497 | Me.Invalidate(r) 498 | r.Dispose() 499 | r = Nothing 500 | MenuItem.Image = value.ToBitmap 501 | End Set 502 | End Property 503 | 504 | _ 505 | Public Shadows Sub [Select]() 506 | If Not IsSelected Then 507 | RaiseEvent Click(Me, New EventArgs) 508 | End If 509 | End Sub 510 | 511 | Private Function CreateGradientBrush(ByVal Rectangle As Rectangle, ByVal Color1 As Color, ByVal Color2 As Color) As Drawing2D.LinearGradientBrush 512 | If m_GlassGradient Then 513 | Return Helper.CreateGlassGradientBrush(Rectangle, Color1, Color2) 514 | Else 515 | Return New Drawing2D.LinearGradientBrush(Rectangle, Color1, Color2, Drawing2D.LinearGradientMode.Vertical) 516 | End If 517 | End Function 518 | 519 | Private Sub TabContents_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles m_Form.Enter 520 | RaiseEvent EnterForm(Me, e) 521 | End Sub 522 | 523 | Private Sub TabContent_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles m_Form.FormClosed 524 | ' if the form is closed closes the tabpage 525 | RaiseEvent Close(Me, New EventArgs) 526 | End Sub 527 | 528 | Private Sub m_Form_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles m_Form.Leave 529 | RaiseEvent LeaveForm(Me, e) 530 | End Sub 531 | 532 | Private Sub TabContent_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles m_Form.TextChanged 533 | CalculateWidth() 534 | Invalidate() 535 | MenuItem.Text = m_Form.Text 536 | End Sub 537 | 538 | Private Sub Tab_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown 539 | If m_Selected And Not (MouseOverCloseButton And m_CloseButtonVisible) Then Exit Sub 540 | If e.Button = Windows.Forms.MouseButtons.Left Then 541 | ' Close button was clicked 542 | If MouseOverCloseButton And m_CloseButtonVisible Then 543 | ' try to close the form 544 | m_Form.Close() 545 | Else ' tab was clicked 546 | ' select the tab 547 | [Select]() 548 | End If 549 | End If 550 | End Sub 551 | 552 | Private Sub Tab_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseEnter 553 | If m_Selected Then Exit Sub 554 | If m_HotTrack Then m_Hot = True 555 | Invalidate() 556 | End Sub 557 | 558 | Private Sub Tab_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseLeave 559 | MouseOverCloseButton = False 560 | m_Hot = False 561 | Invalidate() 562 | End Sub 563 | 564 | Private Sub Tab_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove 565 | Static State As Boolean = False 566 | If m_CloseButtonVisible Then 567 | ' verify if the mouse is over the close button 568 | Dim x As Integer = Me.Width - PadRight - m_CloseButtonSize.Width - 2 569 | Dim y As Integer = Me.Height / 2 - m_CloseButtonSize.Height / 2 570 | MouseOverCloseButton = e.X >= x And e.X <= x + m_CloseButtonSize.Width - 1 And e.Y >= y And e.Y <= y + m_CloseButtonSize.Height - 1 571 | If State <> MouseOverCloseButton And m_CloseButtonVisible Then 572 | State = MouseOverCloseButton 573 | Dim r As New Region(New Rectangle(x, y, m_CloseButtonSize.Width, m_CloseButtonSize.Height)) 574 | Me.Invalidate(r) 575 | r.Dispose() 576 | r = Nothing 577 | End If 578 | End If 579 | If Me.RectangleToScreen(Me.ClientRectangle).Contains(Me.PointToScreen(New Point(e.X, e.Y))) Then 580 | Cursor = Cursors.Default 581 | RaiseEvent EndDrag(Me, e) 582 | Else ' the mouse is outside the tab (it happens only when the mouse was pressed on the tab and moved away while pressed) 583 | RaiseEvent Dragging(Me, e) 584 | Cursor = Cursors.No 585 | End If 586 | End Sub 587 | 588 | ' Draws the tab text (the form text) 589 | Private Sub DrawText(ByVal g As Graphics) 590 | Dim f As Font = New Font(Font, IIf(m_Selected And m_FontBoldOnSelect, FontStyle.Bold, FontStyle.Regular)) 591 | Dim b As Brush = New SolidBrush(IIf(m_Selected Or m_Hot, ForeColor, m_ForeColorDisabled)) 592 | Dim bounds As RectangleF = New RectangleF(PadLeft + IIf(m_Form.Icon Is Nothing, 0, m_IconSize.Width) + 2, 1, Width - PadLeft - IIf(m_Form.Icon Is Nothing, 0, m_IconSize.Height) - 5 - IIf(m_CloseButtonVisible, m_CloseButtonSize.Width, 0) - PadRight, Me.DisplayRectangle.Height) 593 | Dim MyFormat As StringFormat = New StringFormat 594 | MyFormat.FormatFlags = StringFormatFlags.NoWrap 595 | MyFormat.LineAlignment = StringAlignment.Center 596 | MyFormat.Trimming = StringTrimming.EllipsisCharacter 597 | g.DrawString(m_Form.Text, f, b, bounds, MyFormat) 598 | MyFormat.Dispose() 599 | b.Dispose() 600 | f.Dispose() 601 | MyFormat = Nothing 602 | b = Nothing 603 | f = Nothing 604 | End Sub 605 | 606 | ' Draws the tab icon if exists (the form icon) 607 | Private Sub DrawIcon(ByVal g As Graphics) 608 | Try 609 | If m_Form.Icon Is Nothing Then Exit Sub 610 | Dim r As Rectangle = New Rectangle(PadLeft, (Me.Height / 2 - m_IconSize.Height / 2), m_IconSize.Width, m_IconSize.Height) 611 | Dim i As Icon = New Icon(m_Form.Icon, m_IconSize) 612 | g.DrawIcon(i, r) 613 | DestroyIcon(i.Handle) 614 | i.Dispose() 615 | i = Nothing 616 | Catch ex As Exception 617 | End Try 618 | End Sub 619 | 620 | _ 621 | Private Shared Function DestroyIcon(ByVal handle As IntPtr) As Boolean 622 | End Function 623 | 624 | ' Draws the Close Button 625 | Private Sub DrawCloseButton(ByVal g As Graphics) 626 | Try 627 | Dim I As Bitmap 628 | Dim x As Integer = Me.Width - (m_CloseButtonSize.Width + PadRight + 2) 629 | Dim y As Integer = Me.Height / 2 - m_CloseButtonSize.Height / 2 630 | If MouseOverCloseButton Then 631 | I = m_CloseButtonImageHot 632 | ElseIf m_Selected Then 633 | I = m_CloseButton 634 | Else 635 | I = m_CloseButtonImageDisabled 636 | End If 637 | Dim IsDisposable As Boolean = False 638 | If I Is Nothing Then 639 | I = GetButton() 640 | IsDisposable = True 641 | End If 642 | Dim icon As Icon = Drawing.Icon.FromHandle(I.GetHicon) 643 | Dim r As Rectangle = New Rectangle(x, y, m_CloseButtonSize.Width, m_CloseButtonSize.Height) 644 | g.DrawIcon(icon, r) 645 | If IsDisposable Then 646 | I.Dispose() 647 | I = Nothing 648 | End If 649 | DestroyIcon(icon.Handle) 650 | icon.Dispose() 651 | icon = Nothing 652 | Catch ex As Exception 653 | End Try 654 | End Sub 655 | 656 | ' Generates the close button image 657 | Private Function GetButton() As Bitmap 658 | Dim Points() As System.Drawing.Point = {New Point(1, 0), New Point(3, 0), New Point(5, 2), New Point(7, 0), New Point(9, 0), New Point(6, 3), New Point(6, 4), New Point(9, 7), New Point(7, 7), New Point(5, 5), New Point(3, 7), New Point(1, 7), New Point(4, 4), New Point(4, 3)} 659 | Dim gp As New Drawing2D.GraphicsPath 660 | Dim bch As Color 661 | Dim bcl As Color 662 | Dim bc As Color 663 | Dim fc As Color 664 | Dim B As Bitmap 665 | Dim m As New Drawing2D.Matrix 666 | Dim path() As System.Drawing.Point = {New Point(0, 1), New Point(1, 0), New Point(15, 0), New Point(16, 1), New Point(16, 14), New Point(15, 15), New Point(1, 15), New Point(0, 14)} 667 | Dim g As Graphics 668 | If MouseOverCloseButton Then 669 | bch = RenderColors.TabCloseButtonBackHighColorHot(m_RenderMode, CloseButtonBackHighColorHot) 670 | bcl = RenderColors.TabCloseButtonBackLowColorHot(m_RenderMode, CloseButtonBackLowColorHot) 671 | bc = RenderColors.TabCloseButtonBorderColorHot(m_RenderMode, CloseButtonBorderColorHot) 672 | fc = RenderColors.TabCloseButtonForeColorHot(m_RenderMode, CloseButtonForeColorHot) 673 | ElseIf m_Selected Then 674 | bch = RenderColors.TabCloseButtonBackHighColor(m_RenderMode, CloseButtonBackHighColor) 675 | bcl = RenderColors.TabCloseButtonBackLowColor(m_RenderMode, CloseButtonBackLowColor) 676 | bc = RenderColors.TabCloseButtonBorderColor(m_RenderMode, CloseButtonBorderColor) 677 | fc = RenderColors.TabCloseButtonForeColor(m_RenderMode, CloseButtonForeColor) 678 | Else 679 | bch = RenderColors.TabCloseButtonBackHighColorDisabled(m_RenderMode, CloseButtonBackHighColorDisabled) 680 | bcl = RenderColors.TabCloseButtonBackLowColorDisabled(m_RenderMode, CloseButtonBackLowColorDisabled) 681 | bc = RenderColors.TabCloseButtonBorderColorDisabled(m_RenderMode, CloseButtonBorderColorDisabled) 682 | fc = RenderColors.TabCloseButtonForeColorDisabled(m_RenderMode, CloseButtonForeColorDisabled) 683 | End If 684 | B = New Bitmap(17, 17) 685 | B.MakeTransparent() 686 | g = Graphics.FromImage(B) 687 | ' draw the border and background 688 | g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias 689 | Dim l As New Drawing2D.LinearGradientBrush(New Point(0, 0), New Point(0, 15), bch, bcl) 690 | g.FillPolygon(l, path) 691 | Dim p As New Pen(bc) 692 | g.DrawPolygon(p, path) 693 | g.SmoothingMode = Drawing2D.SmoothingMode.Default 694 | ' draw the foreground 695 | gp.AddPolygon(Points) 696 | m.Translate(3, 4) 697 | gp.Transform(m) 698 | p.Dispose() 699 | p = New Pen(fc) 700 | g.DrawPolygon(p, gp.PathPoints) 701 | Dim sb As New SolidBrush(fc) 702 | g.FillPolygon(sb, gp.PathPoints) 703 | sb.Dispose() 704 | p.Dispose() 705 | gp.Dispose() 706 | g.Dispose() 707 | m.Dispose() 708 | Return B 709 | End Function 710 | 711 | ' Calculates the tab width 712 | Private Sub CalculateWidth() 713 | Dim g As Graphics = Me.CreateGraphics() 714 | Dim iw As Integer = 0 715 | Dim cbw As Integer = 0 716 | Dim w As Integer = Width 717 | If m_Form.Icon IsNot Nothing Then iw = m_IconSize.Width 718 | If m_CloseButtonVisible Then cbw = m_CloseButtonSize.Width 719 | Dim f As New Font(Font, IIf(m_FontBoldOnSelect, FontStyle.Bold, FontStyle.Regular)) 720 | w = PadLeft + iw + 3 + g.MeasureString(m_Form.Text, f).Width + 3 + cbw + m_PadRight + 2 721 | f.Dispose() 722 | If w < m_MinimumWidth + 1 Then 723 | w = m_MinimumWidth + 1 724 | ElseIf w > m_MaximumWidth + 1 Then 725 | w = m_MaximumWidth + 1 726 | End If 727 | If w <> Width Then 728 | Width = w 729 | End If 730 | g.Dispose() 731 | End Sub 732 | 733 | ' Get the tab region shape 734 | Private Function GetRegion(ByVal W As Integer, ByVal H As Integer, ByVal H1 As Integer) As Point() 735 | Dim R() As Point = {New Point(0, H), New Point(0, 2), New Point(2, 0), New Point(W - 3, 0), New Point(W - 1, 2), New Point(W - 1, H)} 736 | Dim e As New TabControl.GetTabRegionEventArgs(R, W, H, Me.IsSelected) 737 | RaiseEvent GetTabRegion(Me, e) 738 | Array.Resize(e.Points, e.Points.Length + 2) 739 | Array.Copy(e.Points, 0, e.Points, 1, e.Points.Length - 1) 740 | e.Points(0) = New Point(e.Points(1).X, H1) 741 | e.Points(e.Points.Length - 1) = New Point(e.Points(e.Points.Length - 2).X, H1) 742 | Return e.Points 743 | End Function 744 | 745 | Private Sub MirrorPath(ByVal GraphicPath As Drawing2D.GraphicsPath) 746 | Dim m As New Matrix 747 | m.Translate(0, Height - 1) 748 | m.Scale(1, -1) 749 | GraphicPath.Transform(m) 750 | m.Dispose() 751 | End Sub 752 | 753 | ' Paint the tab 754 | Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs) 755 | Dim Painting As Boolean = False 756 | If Painting Then Exit Sub 757 | Painting = True 758 | Me.SuspendLayout() 759 | Dim RenderBorderColor As Color 760 | Dim RenderBottomColor As Color 761 | Dim RenderHighColor As Color 762 | Dim RenderLowColor As Color 763 | Dim GraphicPath As New Drawing2D.GraphicsPath 764 | 765 | Dim w As Integer = Me.Width 766 | CalculateWidth() 767 | If w <> Me.Width Then 768 | GraphicPath.Dispose() 769 | Exit Sub 770 | End If 771 | 772 | If m_Selected Then 773 | RenderBorderColor = RenderColors.BorderColor(m_RenderMode, BorderColor) 774 | RenderHighColor = RenderColors.TabBackHighColor(m_RenderMode, BackHighColor) 775 | RenderLowColor = RenderColors.TabBackLowColor(m_RenderMode, BackLowColor) 776 | RenderBottomColor = RenderColors.TabBackLowColor(m_RenderMode, BackLowColor) 777 | ElseIf m_Hot Then 778 | RenderBorderColor = RenderColors.BorderColor(m_RenderMode, BorderColor) 779 | RenderHighColor = RenderColors.TabBackHighColor(m_RenderMode, BackHighColor) 780 | RenderLowColor = RenderColors.TabBackLowColor(m_RenderMode, BackLowColor) 781 | RenderBottomColor = RenderColors.BorderColor(m_RenderMode, BorderColor) 782 | Else 783 | RenderBorderColor = RenderColors.BorderColorDisabled(m_RenderMode, BorderColorDisabled) 784 | RenderHighColor = RenderColors.TabBackHighColorDisabled(m_RenderMode, BackHighColorDisabled) 785 | RenderLowColor = RenderColors.TabBackLowColorDisabled(m_RenderMode, BackLowColorDisabled) 786 | RenderBottomColor = RenderColors.BorderColor(m_RenderMode, BorderColor) 787 | End If 788 | 789 | e.Graphics.SmoothingMode = m_SmoothingMode 790 | 791 | GraphicPath.AddPolygon(GetRegion(Width - 1, Height - 1, IIf(Me.IsSelected, Height, Height - 1))) 792 | 793 | ' if is bottom mirror the button vertically 794 | If m_Alignment = TabControl.TabAlignment.Bottom Then 795 | MirrorPath(GraphicPath) 796 | Dim x As Color = RenderHighColor 797 | RenderHighColor = RenderLowColor 798 | RenderLowColor = x 799 | End If 800 | 801 | ' Get the correct region including all the borders 802 | Dim R As Region = New Region(GraphicPath) 803 | Dim R1 As Region = New Region(GraphicPath) 804 | Dim R2 As Region = New Region(GraphicPath) 805 | Dim R3 As Region = New Region(GraphicPath) 806 | Dim M1 As Matrix = New Matrix 807 | Dim M2 As Matrix = New Matrix 808 | Dim M3 As Matrix = New Matrix 809 | M1.Translate(0, -0.5) 810 | M2.Translate(0, 0.5) 811 | M3.Translate(1, 0) 812 | R1.Transform(M1) 813 | R2.Transform(M2) 814 | R3.Transform(M3) 815 | R.Union(R1) 816 | R.Union(R2) 817 | R.Union(R3) 818 | Me.Region = R 819 | 820 | Dim RF As RectangleF = R.GetBounds(e.Graphics) 821 | Dim rec As New Rectangle(0, 0, RF.Width, RF.Height) 822 | Dim te As TabControl.TabPaintEventArgs 823 | 824 | te = New TabControl.TabPaintEventArgs(e.Graphics, rec, m_Selected, m_Hot, GraphicPath, Width, Height) 825 | RaiseEvent TabPaintBackground(Me, te) ' try to owner draw 826 | Dim gb As LinearGradientBrush = CreateGradientBrush(New Rectangle(0, 0, Me.Width, Me.Height), RenderHighColor, RenderLowColor) 827 | If Not te.Handled Then e.Graphics.FillPath(gb, GraphicPath) 828 | gb.Dispose() 829 | te.Dispose() 830 | 831 | te = New TabControl.TabPaintEventArgs(e.Graphics, rec, m_Selected, m_Hot, GraphicPath, Width, Height) 832 | RaiseEvent TabPaintBorder(Me, te) ' try to owner draw 833 | If Not te.Handled Then 834 | If m_BorderEnhanced Then 835 | Dim c As Color = IIf(m_Alignment = TabControl.TabAlignment.Bottom, RenderLowColor, RenderHighColor) 836 | Dim p As New Pen(c, m_BorderEnhanceWeight) 837 | e.Graphics.DrawLines(p, GraphicPath.PathPoints) 838 | p.Dispose() 839 | End If 840 | Dim p1 As New Pen(RenderBorderColor) 841 | e.Graphics.DrawLines(p1, GraphicPath.PathPoints) 842 | p1.Dispose() 843 | End If 844 | te.Dispose() 845 | 846 | e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.None 847 | e.Graphics.DrawLine(New Pen(RenderBottomColor), GraphicPath.PathPoints(0), GraphicPath.PathPoints(GraphicPath.PointCount - 1)) 848 | e.Graphics.SmoothingMode = m_SmoothingMode 849 | 850 | DrawIcon(e.Graphics) 851 | DrawText(e.Graphics) 852 | If m_CloseButtonVisible Then DrawCloseButton(e.Graphics) 853 | Me.ResumeLayout() 854 | 855 | ' do the memory cleanup 856 | GraphicPath.Dispose() 857 | M1.Dispose() 858 | M2.Dispose() 859 | M3.Dispose() 860 | R1.Dispose() 861 | R2.Dispose() 862 | R3.Dispose() 863 | R.Dispose() 864 | te.Dispose() 865 | Painting = False 866 | End Sub 867 | 868 | #Region " Obsolete properties " 869 | 870 | _ 871 | Public Overrides Property MinimumSize() As Size 872 | Get 873 | End Get 874 | Set(ByVal value As Size) 875 | End Set 876 | End Property 877 | 878 | _ 879 | Public Overrides Property MaximumSize() As Size 880 | Get 881 | End Get 882 | Set(ByVal value As Size) 883 | End Set 884 | End Property 885 | 886 | _ 887 | Public Shadows Property Padding() As Padding 888 | Get 889 | End Get 890 | Set(ByVal value As Padding) 891 | End Set 892 | End Property 893 | 894 | _ 895 | Public Overrides Property BackColor() As Color 896 | Get 897 | End Get 898 | Set(ByVal value As Color) 899 | End Set 900 | End Property 901 | 902 | _ 903 | Public Overrides Property Dock() As System.Windows.Forms.DockStyle 904 | Get 905 | End Get 906 | Set(ByVal value As System.Windows.Forms.DockStyle) 907 | End Set 908 | End Property 909 | 910 | _ 911 | Public Overrides Property Anchor() As System.Windows.Forms.AnchorStyles 912 | Get 913 | End Get 914 | Set(ByVal value As System.Windows.Forms.AnchorStyles) 915 | End Set 916 | End Property 917 | 918 | _ 919 | Public Overrides Property Text() As String 920 | Get 921 | Return Nothing 922 | End Get 923 | Set(ByVal value As String) 924 | End Set 925 | End Property 926 | 927 | #End Region 928 | 929 | End Class 930 | --------------------------------------------------------------------------------