├── .editorconfig ├── .gitignore ├── CHANGELOG.md ├── Cyotek.Windows.Forms.FontDialog.sln ├── LICENSE.txt ├── README.md ├── makerelease.cmd ├── nuget.config ├── resources ├── icon-16.png ├── icon-24.png ├── icon-32.png ├── icon-48.png ├── icon.ico ├── icon.pdn └── icon.png └── src ├── Cyotek.Windows.Forms.FontDialog.Demo ├── AboutDialog.cs ├── AboutDialog.designer.cs ├── AboutDialog.resx ├── BaseForm.cs ├── BaseForm.designer.cs ├── BaseForm.resx ├── Cyotek.Windows.Forms.FontDialog.Demo.csproj ├── EventsListBox.cs ├── GeneralDemonstrationForm.Designer.cs ├── GeneralDemonstrationForm.cs ├── GeneralDemonstrationForm.resx ├── GroupBox.cs ├── MainMenuForm.cs ├── MainMenuForm.designer.cs ├── MainMenuForm.resx ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── PropertyGrid.cs ├── Resources │ └── markdownpad-github.css └── packages.config └── Cyotek.Windows.Forms.FontDialog ├── Cyotek.Windows.Forms.FontDialog.csproj ├── Cyotek.Windows.Forms.FontDialog.nuspec ├── FontDialog.cs ├── NativeConstants.cs ├── NativeMethods.cs ├── NativeStructs.cs ├── Properties └── AssemblyInfo.cs └── cyopublic.snk /.editorconfig: -------------------------------------------------------------------------------- 1 | ; http://editorconfig.org/ 2 | ; https://visualstudiogallery.msdn.microsoft.com/c8bccfe2-650c-4b42-bc5c-845e21f96328 3 | 4 | root=true 5 | 6 | [*] 7 | end_of_line = crlf 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | charset = utf-8 11 | 12 | [*.cs] 13 | indent_style = space 14 | indent_size = 2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | *.ndproj 4 | 5 | packages 6 | releases 7 | bin 8 | obj 9 | NDependOut 10 | push.cmd -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Cyotek FontDialog Change Log 2 | 3 | ## 1.0.0.0 4 | * Initial release 5 | -------------------------------------------------------------------------------- /Cyotek.Windows.Forms.FontDialog.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cyotek.Windows.Forms.FontDialog.Demo", "src\Cyotek.Windows.Forms.FontDialog.Demo\Cyotek.Windows.Forms.FontDialog.Demo.csproj", "{05DD1A2A-9714-4C73-9A18-0B38A3CBB1EF}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cyotek.Windows.Forms.FontDialog", "src\Cyotek.Windows.Forms.FontDialog\Cyotek.Windows.Forms.FontDialog.csproj", "{CA50CA44-04D9-41BE-9BF7-E61E034B997D}" 9 | EndProject 10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{90232E9C-F326-4F7E-8782-6848920842BA}" 11 | ProjectSection(SolutionItems) = preProject 12 | CHANGELOG.md = CHANGELOG.md 13 | LICENSE.txt = LICENSE.txt 14 | push.cmd = push.cmd 15 | README.md = README.md 16 | EndProjectSection 17 | EndProject 18 | Global 19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 20 | Debug|Any CPU = Debug|Any CPU 21 | Release|Any CPU = Release|Any CPU 22 | EndGlobalSection 23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 24 | {05DD1A2A-9714-4C73-9A18-0B38A3CBB1EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 25 | {05DD1A2A-9714-4C73-9A18-0B38A3CBB1EF}.Debug|Any CPU.Build.0 = Debug|Any CPU 26 | {05DD1A2A-9714-4C73-9A18-0B38A3CBB1EF}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {05DD1A2A-9714-4C73-9A18-0B38A3CBB1EF}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {CA50CA44-04D9-41BE-9BF7-E61E034B997D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {CA50CA44-04D9-41BE-9BF7-E61E034B997D}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {CA50CA44-04D9-41BE-9BF7-E61E034B997D}.Release|Any CPU.ActiveCfg = Release|Any CPU 31 | {CA50CA44-04D9-41BE-9BF7-E61E034B997D}.Release|Any CPU.Build.0 = Release|Any CPU 32 | EndGlobalSection 33 | GlobalSection(SolutionProperties) = preSolution 34 | HideSolutionNode = FALSE 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © 2015 Cyotek Ltd. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cyotek FontDialog 2 | 3 | Have you ever seen an exception like this? 4 | 5 | System.ArgumentException: Only TrueType fonts are supported. This is not a TrueType font. 6 | at System.Drawing.Font.FromLogFont(Object lf, IntPtr hdc) 7 | at System.Windows.Forms.FontDialog.UpdateFont(LOGFONT lf) 8 | at System.Windows.Forms.FontDialog.RunDialog(IntPtr hWndOwner) 9 | at System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner) 10 | 11 | This exception is thrown when using the `System.Windows.Forms.FontDialog` component and you select an invalid font. And you can't do a thing about it, as this exception is buried in a private method of the `FontDialog` and isn't handled. 12 | 13 | As the bug has been there for years without being fixed, and given that fact that Windows Forms isn't exactly high on the list of priorities for Microsoft, I suspect it will never be fixed. This is one wheel I'd prefer not to reinvent, but... here it is anyway. 14 | 15 | > I haven't actually managed to find a font that causes this type of crash, although I have quite a few automated error reports from users who experience it. If you know of such a font that is available for download, please let me know so that I can test this myself. I assume my version fixes the problem but at this point I don't actually know for sure. 16 | 17 | The `Cyotek.Windows.Forms.FontDialog` component is a drop in replacement for the original `System.Windows.Forms.FontDialog`, but without the crash that occurs when selecting a non-True Type font. 18 | 19 | This version uses the native Win32 dialog via `ChooseFont` - the hook procedure to handle the `Apply` event and hiding the colour combobox has been taken directly from the original managed component. 20 | 21 | There's also a fully managed solution buried in one of the branches of this repository. It is incomplete, mainly because I wasn't able to determine which fonts are hidden by settings, and how to combine families with non standard styles such as Light. It's still interesting in its own right, showing how to use `EnumFontFamiliesEx` etc, but for now it is on hold as a work in progress. 22 | 23 | ## NuGet Package 24 | 25 | A NuGet package [is available](https://www.nuget.org/packages/Cyotek.Windows.Forms.FontDialog/1.0.0). 26 | 27 | > PM> Install-Package Cyotek.Windows.Forms.FontDialog 28 | 29 | ## License 30 | 31 | The `FontDialog` component is licensed under the MIT License. See `LICENSE.txt` for the full text. 32 | 33 | ## Further Reading 34 | 35 | For more information on this control, see the [articles tagged with fontdialog](http://cyotek.com/blog/tag/fontdialog) at cyotek.com. 36 | -------------------------------------------------------------------------------- /makerelease.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | SETLOCAL 4 | 5 | CALL ..\..\..\build\set35vars.bat 6 | 7 | %msbuildexe% Cyotek.Windows.Forms.FontDialog.sln /p:Configuration=Release /verbosity:minimal /nologo /t:Clean,Build 8 | CALL signcmd src\Cyotek.Windows.Forms.FontDialog\bin\Release\Cyotek.Windows.Forms.FontDialog.dll 9 | 10 | PUSHD 11 | MD releases 12 | CD releases 13 | 14 | NUGET pack ..\src\Cyotek.Windows.Forms.FontDialog\Cyotek.Windows.Forms.FontDialog.csproj -Prop Configuration=Release 15 | 16 | %zipexe% -a Cyotek.Windows.Forms.FontDialog.x.x.x.x.zip ..\src\Cyotek.Windows.Forms.FontDialog\bin\Release\Cyotek.Windows.Forms.FontDialog.dll ..\src\Cyotek.Windows.Forms.FontDialog\bin\Release\Cyotek.Windows.Forms.FontDialog.xml -ex 17 | 18 | POPD 19 | 20 | ENDLOCAL 21 | -------------------------------------------------------------------------------- /nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /resources/icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyotek/Cyotek.Windows.Forms.FontDialog/cfca735fa684d828a444277788be086ae7c94928/resources/icon-16.png -------------------------------------------------------------------------------- /resources/icon-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyotek/Cyotek.Windows.Forms.FontDialog/cfca735fa684d828a444277788be086ae7c94928/resources/icon-24.png -------------------------------------------------------------------------------- /resources/icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyotek/Cyotek.Windows.Forms.FontDialog/cfca735fa684d828a444277788be086ae7c94928/resources/icon-32.png -------------------------------------------------------------------------------- /resources/icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyotek/Cyotek.Windows.Forms.FontDialog/cfca735fa684d828a444277788be086ae7c94928/resources/icon-48.png -------------------------------------------------------------------------------- /resources/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyotek/Cyotek.Windows.Forms.FontDialog/cfca735fa684d828a444277788be086ae7c94928/resources/icon.ico -------------------------------------------------------------------------------- /resources/icon.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyotek/Cyotek.Windows.Forms.FontDialog/cfca735fa684d828a444277788be086ae7c94928/resources/icon.pdn -------------------------------------------------------------------------------- /resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyotek/Cyotek.Windows.Forms.FontDialog/cfca735fa684d828a444277788be086ae7c94928/resources/icon.png -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/AboutDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyotek/Cyotek.Windows.Forms.FontDialog/cfca735fa684d828a444277788be086ae7c94928/src/Cyotek.Windows.Forms.FontDialog.Demo/AboutDialog.cs -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/AboutDialog.designer.cs: -------------------------------------------------------------------------------- 1 | namespace Cyotek.Windows.Forms.Demo 2 | { 3 | partial class AboutDialog 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.closeButton = new System.Windows.Forms.Button(); 33 | this.nameLabel = new System.Windows.Forms.Label(); 34 | this.versionLabel = new System.Windows.Forms.Label(); 35 | this.copyrightLabel = new System.Windows.Forms.Label(); 36 | this.iconPictureBox = new System.Windows.Forms.PictureBox(); 37 | this.footerGroupBox = new System.Windows.Forms.Panel(); 38 | this.webLinkLabel = new System.Windows.Forms.LinkLabel(); 39 | this.TabControl = new System.Windows.Forms.TabControl(); 40 | this.toolTip = new System.Windows.Forms.ToolTip(this.components); 41 | ((System.ComponentModel.ISupportInitialize)(this.iconPictureBox)).BeginInit(); 42 | this.footerGroupBox.SuspendLayout(); 43 | this.SuspendLayout(); 44 | // 45 | // closeButton 46 | // 47 | this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 48 | this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 49 | this.closeButton.Location = new System.Drawing.Point(528, 12); 50 | this.closeButton.Name = "closeButton"; 51 | this.closeButton.Size = new System.Drawing.Size(75, 23); 52 | this.closeButton.TabIndex = 1; 53 | this.closeButton.Text = "Close"; 54 | this.closeButton.UseVisualStyleBackColor = true; 55 | this.closeButton.Click += new System.EventHandler(this.closeButton_Click); 56 | // 57 | // nameLabel 58 | // 59 | this.nameLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 60 | | System.Windows.Forms.AnchorStyles.Right))); 61 | this.nameLabel.AutoSize = true; 62 | this.nameLabel.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 63 | this.nameLabel.Location = new System.Drawing.Point(50, 12); 64 | this.nameLabel.Name = "nameLabel"; 65 | this.nameLabel.Size = new System.Drawing.Size(38, 13); 66 | this.nameLabel.TabIndex = 0; 67 | this.nameLabel.Text = "Name"; 68 | // 69 | // versionLabel 70 | // 71 | this.versionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 72 | | System.Windows.Forms.AnchorStyles.Right))); 73 | this.versionLabel.AutoSize = true; 74 | this.versionLabel.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 75 | this.versionLabel.Location = new System.Drawing.Point(50, 25); 76 | this.versionLabel.Name = "versionLabel"; 77 | this.versionLabel.Size = new System.Drawing.Size(45, 13); 78 | this.versionLabel.TabIndex = 1; 79 | this.versionLabel.Text = "Version"; 80 | // 81 | // copyrightLabel 82 | // 83 | this.copyrightLabel.AutoSize = true; 84 | this.copyrightLabel.Location = new System.Drawing.Point(53, 47); 85 | this.copyrightLabel.Name = "copyrightLabel"; 86 | this.copyrightLabel.Size = new System.Drawing.Size(58, 15); 87 | this.copyrightLabel.TabIndex = 2; 88 | this.copyrightLabel.Text = "copyright"; 89 | // 90 | // iconPictureBox 91 | // 92 | this.iconPictureBox.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Icon; 93 | this.iconPictureBox.Location = new System.Drawing.Point(12, 12); 94 | this.iconPictureBox.Name = "iconPictureBox"; 95 | this.iconPictureBox.Size = new System.Drawing.Size(32, 32); 96 | this.iconPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; 97 | this.iconPictureBox.TabIndex = 4; 98 | this.iconPictureBox.TabStop = false; 99 | // 100 | // footerGroupBox 101 | // 102 | this.footerGroupBox.BackColor = System.Drawing.SystemColors.Control; 103 | this.footerGroupBox.Controls.Add(this.webLinkLabel); 104 | this.footerGroupBox.Controls.Add(this.closeButton); 105 | this.footerGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom; 106 | this.footerGroupBox.Location = new System.Drawing.Point(0, 448); 107 | this.footerGroupBox.Name = "footerGroupBox"; 108 | this.footerGroupBox.Size = new System.Drawing.Size(615, 47); 109 | this.footerGroupBox.TabIndex = 4; 110 | this.footerGroupBox.Paint += new System.Windows.Forms.PaintEventHandler(this.footerGroupBox_Paint); 111 | // 112 | // webLinkLabel 113 | // 114 | this.webLinkLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 115 | this.webLinkLabel.AutoSize = true; 116 | this.webLinkLabel.ForeColor = System.Drawing.SystemColors.HotTrack; 117 | this.webLinkLabel.Location = new System.Drawing.Point(12, 16); 118 | this.webLinkLabel.Name = "webLinkLabel"; 119 | this.webLinkLabel.Size = new System.Drawing.Size(99, 15); 120 | this.webLinkLabel.TabIndex = 0; 121 | this.webLinkLabel.TabStop = true; 122 | this.webLinkLabel.Tag = "www.cyotek.com"; 123 | this.webLinkLabel.Text = "www.cyotek.com"; 124 | this.toolTip.SetToolTip(this.webLinkLabel, "Visit the Cyotek website for development topics and code"); 125 | this.webLinkLabel.Click += new System.EventHandler(this.webLinkLabel_Click); 126 | // 127 | // docsTabControl 128 | // 129 | this.TabControl.Location = new System.Drawing.Point(12, 77); 130 | this.TabControl.Name = "TabControl"; 131 | this.TabControl.SelectedIndex = 0; 132 | this.TabControl.Size = new System.Drawing.Size(591, 365); 133 | this.TabControl.TabIndex = 3; 134 | this.TabControl.Selecting += new System.Windows.Forms.TabControlCancelEventHandler(this.docsTabControl_Selecting); 135 | // 136 | // AboutDialog 137 | // 138 | this.AcceptButton = this.closeButton; 139 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); 140 | this.BackColor = System.Drawing.SystemColors.Window; 141 | this.CancelButton = this.closeButton; 142 | this.ClientSize = new System.Drawing.Size(615, 495); 143 | this.Controls.Add(this.TabControl); 144 | this.Controls.Add(this.footerGroupBox); 145 | this.Controls.Add(this.iconPictureBox); 146 | this.Controls.Add(this.copyrightLabel); 147 | this.Controls.Add(this.versionLabel); 148 | this.Controls.Add(this.nameLabel); 149 | this.Font = new System.Drawing.Font("Segoe UI", 9F); 150 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 151 | this.MaximizeBox = false; 152 | this.Name = "AboutDialog"; 153 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 154 | this.Text = "About"; 155 | ((System.ComponentModel.ISupportInitialize)(this.iconPictureBox)).EndInit(); 156 | this.footerGroupBox.ResumeLayout(false); 157 | this.footerGroupBox.PerformLayout(); 158 | this.ResumeLayout(false); 159 | this.PerformLayout(); 160 | 161 | } 162 | 163 | #endregion 164 | 165 | private System.Windows.Forms.Button closeButton; 166 | private System.Windows.Forms.Label nameLabel; 167 | private System.Windows.Forms.Label versionLabel; 168 | private System.Windows.Forms.Label copyrightLabel; 169 | private System.Windows.Forms.PictureBox iconPictureBox; 170 | private System.Windows.Forms.Panel footerGroupBox; 171 | private System.Windows.Forms.LinkLabel webLinkLabel; 172 | 173 | private System.Windows.Forms.ToolTip toolTip; 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/AboutDialog.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 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/BaseForm.cs: -------------------------------------------------------------------------------- 1 | /* Cyotek FontDialog 2 | * http://cyotek.com 3 | * http://cyotek.com/blog/tag/fontdialog 4 | * 5 | * Copyright © 2015 Cyotek Ltd. 6 | * 7 | * Licensed under the MIT License. See LICENSE.txt for the full text. 8 | */ 9 | 10 | using System; 11 | using System.Drawing; 12 | using System.Windows.Forms; 13 | 14 | namespace Cyotek.Windows.Forms.Demo 15 | { 16 | internal partial class BaseForm : Form 17 | { 18 | #region Constructors 19 | 20 | public BaseForm() 21 | { 22 | this.InitializeComponent(); 23 | } 24 | 25 | #endregion 26 | 27 | #region Methods 28 | 29 | protected string FormatPoint(Point point) 30 | { 31 | return string.Format("X:{0}, Y:{1}", point.X, point.Y); 32 | } 33 | 34 | protected string FormatRectangle(RectangleF rect) 35 | { 36 | return string.Format("X:{0}, Y:{1}, W:{2}, H:{3}", (int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height); 37 | } 38 | 39 | protected override void OnLoad(EventArgs e) 40 | { 41 | this.Font = SystemFonts.MessageBoxFont; 42 | 43 | base.OnLoad(e); 44 | } 45 | 46 | protected override void OnShown(EventArgs e) 47 | { 48 | base.OnShown(e); 49 | 50 | Cursor.Current = Cursors.Default; 51 | } 52 | 53 | #endregion 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/BaseForm.designer.cs: -------------------------------------------------------------------------------- 1 | namespace Cyotek.Windows.Forms.Demo 2 | { 3 | partial class BaseForm 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.SuspendLayout(); 32 | // 33 | // BaseForm 34 | // 35 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 37 | this.ClientSize = new System.Drawing.Size(726, 323); 38 | this.MinimizeBox = false; 39 | this.Name = "BaseForm"; 40 | this.ShowIcon = false; 41 | this.ShowInTaskbar = false; 42 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 43 | this.Text = "BaseForm"; 44 | this.ResumeLayout(false); 45 | 46 | } 47 | 48 | #endregion 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/BaseForm.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/Cyotek.Windows.Forms.FontDialog.Demo/Cyotek.Windows.Forms.FontDialog.Demo.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {05DD1A2A-9714-4C73-9A18-0B38A3CBB1EF} 8 | WinExe 9 | Properties 10 | Cyotek.Windows.Forms.Demo 11 | fntdlgex 12 | v3.5 13 | 512 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 | ..\..\resources\icon.ico 36 | 37 | 38 | 39 | ..\..\packages\CommonMark.NET.0.9.1\lib\net35-client\CommonMark.dll 40 | True 41 | 42 | 43 | ..\..\packages\HtmlRenderer.Core.1.5.0.6\lib\net35-client\HtmlRenderer.dll 44 | True 45 | 46 | 47 | ..\..\packages\HtmlRenderer.WinForms.1.5.0.6\lib\net35-client\HtmlRenderer.WinForms.dll 48 | True 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | Form 58 | 59 | 60 | AboutDialog.cs 61 | 62 | 63 | Form 64 | 65 | 66 | BaseForm.cs 67 | 68 | 69 | Component 70 | 71 | 72 | Form 73 | 74 | 75 | GeneralDemonstrationForm.cs 76 | 77 | 78 | Component 79 | 80 | 81 | Form 82 | 83 | 84 | MainMenuForm.cs 85 | 86 | 87 | 88 | 89 | True 90 | True 91 | Resources.resx 92 | 93 | 94 | Component 95 | 96 | 97 | AboutDialog.cs 98 | 99 | 100 | BaseForm.cs 101 | 102 | 103 | GeneralDemonstrationForm.cs 104 | 105 | 106 | MainMenuForm.cs 107 | 108 | 109 | ResXFileCodeGenerator 110 | Designer 111 | Resources.Designer.cs 112 | 113 | 114 | CHANGELOG.md 115 | PreserveNewest 116 | 117 | 118 | README.md 119 | PreserveNewest 120 | 121 | 122 | 123 | 124 | 125 | LICENSE.txt 126 | PreserveNewest 127 | 128 | 129 | Resources\icon-32.png 130 | 131 | 132 | Resources\icon.ico 133 | 134 | 135 | 136 | 137 | 138 | {CA50CA44-04D9-41BE-9BF7-E61E034B997D} 139 | Cyotek.Windows.Forms.FontDialog 140 | 141 | 142 | 143 | 150 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/EventsListBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Text; 5 | using System.Windows.Forms; 6 | 7 | namespace Cyotek.Windows.Forms.Demo 8 | { 9 | // Cyotek ImageBox 10 | // Copyright (c) 2010-2015 Cyotek Ltd. 11 | // http://cyotek.com 12 | // http://cyotek.com/blog/tag/imagebox 13 | 14 | // Licensed under the MIT License. See license.txt for the full text. 15 | 16 | // If you use this control in your applications, attribution, donations or contributions are welcome. 17 | 18 | internal class EventsListBox : ListBox 19 | { 20 | #region Constructors 21 | 22 | public EventsListBox() 23 | { 24 | this.IntegralHeight = false; 25 | } 26 | 27 | #endregion 28 | 29 | #region Properties 30 | 31 | [DefaultValue(false)] 32 | public new bool IntegralHeight 33 | { 34 | get { return base.IntegralHeight; } 35 | set { base.IntegralHeight = value; } 36 | } 37 | 38 | #endregion 39 | 40 | #region Methods 41 | 42 | public void AddEvent(string eventName) 43 | { 44 | this.AddEvent(eventName, null); 45 | } 46 | 47 | public void AddEvent(string eventName, IDictionary values) 48 | { 49 | this.AddEvent(null, eventName, values); 50 | } 51 | 52 | public void AddEvent(Control sender, string eventName) 53 | { 54 | this.AddEvent(sender, eventName, null); 55 | } 56 | 57 | public void AddEvent(Control sender, string eventName, IDictionary values) 58 | { 59 | StringBuilder eventData; 60 | 61 | eventData = new StringBuilder(); 62 | 63 | eventData.Append(DateTime.Now.ToLongTimeString()); 64 | eventData.Append("\t"); 65 | if (sender != null) 66 | { 67 | eventData.Append(sender.Name); 68 | eventData.Append("."); 69 | } 70 | eventData.Append(eventName); 71 | eventData.Append("("); 72 | 73 | if (values != null) 74 | { 75 | int index; 76 | 77 | index = 0; 78 | 79 | foreach (KeyValuePair value in values) 80 | { 81 | eventData.AppendFormat("{0} = {1}", value.Key, value.Value); 82 | 83 | if (index < values.Count - 1) 84 | { 85 | eventData.Append(", "); 86 | } 87 | 88 | index++; 89 | } 90 | } 91 | eventData.Append(")"); 92 | 93 | this.Items.Add(eventData.ToString()); 94 | this.TopIndex = this.Items.Count - (this.ClientSize.Height / this.ItemHeight); 95 | } 96 | 97 | #endregion 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/GeneralDemonstrationForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Cyotek.Windows.Forms.Demo 2 | { 3 | partial class GeneralDemonstrationForm 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(GeneralDemonstrationForm)); 32 | this.optionsSplitContainer = new System.Windows.Forms.SplitContainer(); 33 | this.panel1 = new System.Windows.Forms.Panel(); 34 | this.closeButton = new System.Windows.Forms.Button(); 35 | this.aboutButton = new System.Windows.Forms.Button(); 36 | this.splitContainer = new System.Windows.Forms.SplitContainer(); 37 | this.sysFontDialog = new System.Windows.Forms.FontDialog(); 38 | this.fontDialog = new Cyotek.Windows.Forms.FontDialog(); 39 | this.groupBox1 = new Cyotek.Windows.Forms.GroupBox(); 40 | this.showWin32DialogButton = new System.Windows.Forms.Button(); 41 | this.newFontDialogGroupBox = new Cyotek.Windows.Forms.GroupBox(); 42 | this.showFontDialogButton = new System.Windows.Forms.Button(); 43 | this.previewGroupBox = new Cyotek.Windows.Forms.GroupBox(); 44 | this.previewLabel = new System.Windows.Forms.Label(); 45 | this.propertyGrid = new Cyotek.Windows.Forms.Demo.PropertyGrid(); 46 | this.eventsListBox = new Cyotek.Windows.Forms.Demo.EventsListBox(); 47 | this.optionsSplitContainer.Panel1.SuspendLayout(); 48 | this.optionsSplitContainer.Panel2.SuspendLayout(); 49 | this.optionsSplitContainer.SuspendLayout(); 50 | this.panel1.SuspendLayout(); 51 | this.splitContainer.Panel1.SuspendLayout(); 52 | this.splitContainer.Panel2.SuspendLayout(); 53 | this.splitContainer.SuspendLayout(); 54 | this.groupBox1.SuspendLayout(); 55 | this.newFontDialogGroupBox.SuspendLayout(); 56 | this.previewGroupBox.SuspendLayout(); 57 | this.SuspendLayout(); 58 | // 59 | // optionsSplitContainer 60 | // 61 | this.optionsSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; 62 | this.optionsSplitContainer.Location = new System.Drawing.Point(0, 0); 63 | this.optionsSplitContainer.Name = "optionsSplitContainer"; 64 | this.optionsSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; 65 | // 66 | // optionsSplitContainer.Panel1 67 | // 68 | this.optionsSplitContainer.Panel1.Controls.Add(this.propertyGrid); 69 | // 70 | // optionsSplitContainer.Panel2 71 | // 72 | this.optionsSplitContainer.Panel2.Controls.Add(this.eventsListBox); 73 | this.optionsSplitContainer.Panel2.Controls.Add(this.panel1); 74 | this.optionsSplitContainer.Size = new System.Drawing.Size(471, 507); 75 | this.optionsSplitContainer.SplitterDistance = 249; 76 | this.optionsSplitContainer.TabIndex = 0; 77 | // 78 | // panel1 79 | // 80 | this.panel1.Controls.Add(this.closeButton); 81 | this.panel1.Controls.Add(this.aboutButton); 82 | this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; 83 | this.panel1.Location = new System.Drawing.Point(0, 216); 84 | this.panel1.Name = "panel1"; 85 | this.panel1.Size = new System.Drawing.Size(471, 38); 86 | this.panel1.TabIndex = 1; 87 | // 88 | // closeButton 89 | // 90 | this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 91 | this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 92 | this.closeButton.Location = new System.Drawing.Point(384, 3); 93 | this.closeButton.Name = "closeButton"; 94 | this.closeButton.Size = new System.Drawing.Size(75, 23); 95 | this.closeButton.TabIndex = 1; 96 | this.closeButton.Text = "Close"; 97 | this.closeButton.UseVisualStyleBackColor = true; 98 | this.closeButton.Click += new System.EventHandler(this.closeButton_Click); 99 | // 100 | // aboutButton 101 | // 102 | this.aboutButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 103 | this.aboutButton.Location = new System.Drawing.Point(303, 3); 104 | this.aboutButton.Name = "aboutButton"; 105 | this.aboutButton.Size = new System.Drawing.Size(75, 23); 106 | this.aboutButton.TabIndex = 0; 107 | this.aboutButton.Text = "&About"; 108 | this.aboutButton.UseVisualStyleBackColor = true; 109 | this.aboutButton.Click += new System.EventHandler(this.aboutButton_Click); 110 | // 111 | // splitContainer 112 | // 113 | this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; 114 | this.splitContainer.Location = new System.Drawing.Point(0, 0); 115 | this.splitContainer.Name = "splitContainer"; 116 | // 117 | // splitContainer.Panel1 118 | // 119 | this.splitContainer.Panel1.Controls.Add(this.groupBox1); 120 | this.splitContainer.Panel1.Controls.Add(this.newFontDialogGroupBox); 121 | this.splitContainer.Panel1.Controls.Add(this.previewGroupBox); 122 | // 123 | // splitContainer.Panel2 124 | // 125 | this.splitContainer.Panel2.Controls.Add(this.optionsSplitContainer); 126 | this.splitContainer.Size = new System.Drawing.Size(791, 507); 127 | this.splitContainer.SplitterDistance = 316; 128 | this.splitContainer.TabIndex = 0; 129 | // 130 | // sysFontDialog 131 | // 132 | this.sysFontDialog.Apply += new System.EventHandler(this.sysFontDialog_Apply); 133 | // 134 | // fontDialog 135 | // 136 | this.fontDialog.Font = new System.Drawing.Font("Trebuchet MS", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 137 | this.fontDialog.Apply += new System.EventHandler(this.fontDialog_Apply); 138 | this.fontDialog.HelpRequest += new System.EventHandler(this.fontDialog_HelpRequest); 139 | // 140 | // groupBox1 141 | // 142 | this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 143 | | System.Windows.Forms.AnchorStyles.Right))); 144 | this.groupBox1.Controls.Add(this.showWin32DialogButton); 145 | this.groupBox1.Location = new System.Drawing.Point(12, 253); 146 | this.groupBox1.Name = "groupBox1"; 147 | this.groupBox1.Size = new System.Drawing.Size(301, 101); 148 | this.groupBox1.TabIndex = 2; 149 | this.groupBox1.TabStop = false; 150 | this.groupBox1.Text = "System.Windows.Forms.FontDialog Implementation"; 151 | // 152 | // showWin32DialogButton 153 | // 154 | this.showWin32DialogButton.Location = new System.Drawing.Point(6, 19); 155 | this.showWin32DialogButton.Name = "showWin32DialogButton"; 156 | this.showWin32DialogButton.Size = new System.Drawing.Size(75, 23); 157 | this.showWin32DialogButton.TabIndex = 0; 158 | this.showWin32DialogButton.Text = "Show &Win32 Dialog"; 159 | this.showWin32DialogButton.UseVisualStyleBackColor = true; 160 | this.showWin32DialogButton.Click += new System.EventHandler(this.showWin32DialogButton_Click); 161 | // 162 | // newFontDialogGroupBox 163 | // 164 | this.newFontDialogGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 165 | | System.Windows.Forms.AnchorStyles.Right))); 166 | this.newFontDialogGroupBox.Controls.Add(this.showFontDialogButton); 167 | this.newFontDialogGroupBox.Location = new System.Drawing.Point(12, 148); 168 | this.newFontDialogGroupBox.Name = "newFontDialogGroupBox"; 169 | this.newFontDialogGroupBox.Size = new System.Drawing.Size(301, 101); 170 | this.newFontDialogGroupBox.TabIndex = 1; 171 | this.newFontDialogGroupBox.TabStop = false; 172 | this.newFontDialogGroupBox.Text = "Cyotek FontDialog Implementation"; 173 | // 174 | // showFontDialogButton 175 | // 176 | this.showFontDialogButton.Location = new System.Drawing.Point(6, 19); 177 | this.showFontDialogButton.Name = "showFontDialogButton"; 178 | this.showFontDialogButton.Size = new System.Drawing.Size(75, 23); 179 | this.showFontDialogButton.TabIndex = 0; 180 | this.showFontDialogButton.Text = "&Show"; 181 | this.showFontDialogButton.UseVisualStyleBackColor = true; 182 | this.showFontDialogButton.Click += new System.EventHandler(this.showFontDialogButton_Click); 183 | // 184 | // previewGroupBox 185 | // 186 | this.previewGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 187 | | System.Windows.Forms.AnchorStyles.Right))); 188 | this.previewGroupBox.Controls.Add(this.previewLabel); 189 | this.previewGroupBox.Location = new System.Drawing.Point(12, 12); 190 | this.previewGroupBox.Name = "previewGroupBox"; 191 | this.previewGroupBox.Size = new System.Drawing.Size(302, 130); 192 | this.previewGroupBox.TabIndex = 0; 193 | this.previewGroupBox.TabStop = false; 194 | this.previewGroupBox.Text = "Preview"; 195 | // 196 | // previewLabel 197 | // 198 | this.previewLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 199 | | System.Windows.Forms.AnchorStyles.Left) 200 | | System.Windows.Forms.AnchorStyles.Right))); 201 | this.previewLabel.AutoEllipsis = true; 202 | this.previewLabel.Location = new System.Drawing.Point(6, 16); 203 | this.previewLabel.Name = "previewLabel"; 204 | this.previewLabel.Size = new System.Drawing.Size(290, 111); 205 | this.previewLabel.TabIndex = 0; 206 | this.previewLabel.Text = "AaBbYyZz"; 207 | this.previewLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 208 | // 209 | // propertyGrid 210 | // 211 | this.propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill; 212 | this.propertyGrid.Location = new System.Drawing.Point(0, 0); 213 | this.propertyGrid.Name = "propertyGrid"; 214 | this.propertyGrid.SelectedObject = this.fontDialog; 215 | this.propertyGrid.Size = new System.Drawing.Size(471, 249); 216 | this.propertyGrid.TabIndex = 0; 217 | // 218 | // eventsListBox 219 | // 220 | this.eventsListBox.Dock = System.Windows.Forms.DockStyle.Fill; 221 | this.eventsListBox.FormattingEnabled = true; 222 | this.eventsListBox.Location = new System.Drawing.Point(0, 0); 223 | this.eventsListBox.Name = "eventsListBox"; 224 | this.eventsListBox.Size = new System.Drawing.Size(471, 216); 225 | this.eventsListBox.TabIndex = 0; 226 | // 227 | // GeneralDemonstrationForm 228 | // 229 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 230 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 231 | this.CancelButton = this.closeButton; 232 | this.ClientSize = new System.Drawing.Size(791, 507); 233 | this.Controls.Add(this.splitContainer); 234 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 235 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 236 | this.MaximizeBox = false; 237 | this.Name = "GeneralDemonstrationForm"; 238 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 239 | this.Text = "General Demonstration"; 240 | this.optionsSplitContainer.Panel1.ResumeLayout(false); 241 | this.optionsSplitContainer.Panel2.ResumeLayout(false); 242 | this.optionsSplitContainer.ResumeLayout(false); 243 | this.panel1.ResumeLayout(false); 244 | this.splitContainer.Panel1.ResumeLayout(false); 245 | this.splitContainer.Panel2.ResumeLayout(false); 246 | this.splitContainer.ResumeLayout(false); 247 | this.groupBox1.ResumeLayout(false); 248 | this.newFontDialogGroupBox.ResumeLayout(false); 249 | this.previewGroupBox.ResumeLayout(false); 250 | this.ResumeLayout(false); 251 | 252 | } 253 | 254 | #endregion 255 | 256 | private Cyotek.Windows.Forms.FontDialog fontDialog; 257 | private EventsListBox eventsListBox; 258 | private PropertyGrid propertyGrid; 259 | private System.Windows.Forms.SplitContainer optionsSplitContainer; 260 | private System.Windows.Forms.SplitContainer splitContainer; 261 | private System.Windows.Forms.Button showFontDialogButton; 262 | private System.Windows.Forms.Button showWin32DialogButton; 263 | private System.Windows.Forms.Label previewLabel; 264 | private GroupBox groupBox1; 265 | private GroupBox newFontDialogGroupBox; 266 | private GroupBox previewGroupBox; 267 | private System.Windows.Forms.FontDialog sysFontDialog; 268 | private System.Windows.Forms.Panel panel1; 269 | private System.Windows.Forms.Button closeButton; 270 | private System.Windows.Forms.Button aboutButton; 271 | } 272 | } 273 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/GeneralDemonstrationForm.cs: -------------------------------------------------------------------------------- 1 | /* Cyotek FontDialog 2 | * http://cyotek.com 3 | * http://cyotek.com/blog/tag/fontdialog 4 | * 5 | * Copyright © 2015 Cyotek Ltd. 6 | * 7 | * Licensed under the MIT License. See LICENSE.txt for the full text. 8 | */ 9 | 10 | using System; 11 | using System.Windows.Forms; 12 | 13 | namespace Cyotek.Windows.Forms.Demo 14 | { 15 | internal partial class GeneralDemonstrationForm : Form 16 | { 17 | #region Constructors 18 | 19 | public GeneralDemonstrationForm() 20 | { 21 | this.InitializeComponent(); 22 | } 23 | 24 | #endregion 25 | 26 | #region Methods 27 | 28 | /// 29 | /// Raises the event. 30 | /// 31 | /// An that contains the event data. 32 | protected override void OnLoad(EventArgs e) 33 | { 34 | base.OnLoad(e); 35 | 36 | this.UpdatePreview(); 37 | } 38 | 39 | private void aboutButton_Click(object sender, EventArgs e) 40 | { 41 | AboutDialog.ShowAboutDialog(); 42 | } 43 | 44 | private void ApplySysFont() 45 | { 46 | fontDialog.Font = sysFontDialog.Font; 47 | fontDialog.Color = sysFontDialog.Color; 48 | 49 | this.UpdatePreview(); 50 | } 51 | 52 | private void closeButton_Click(object sender, EventArgs e) 53 | { 54 | this.Close(); 55 | } 56 | 57 | private void fontDialog_Apply(object sender, EventArgs e) 58 | { 59 | eventsListBox.AddEvent("Apply"); 60 | 61 | this.UpdatePreview(); 62 | } 63 | 64 | private void fontDialog_HelpRequest(object sender, EventArgs e) 65 | { 66 | eventsListBox.AddEvent("HelpRequest"); 67 | } 68 | 69 | private void showFontDialogButton_Click(object sender, EventArgs e) 70 | { 71 | if (fontDialog.ShowDialog(this) == DialogResult.OK) 72 | { 73 | this.UpdatePreview(); 74 | } 75 | } 76 | 77 | private void showWin32DialogButton_Click(object sender, EventArgs e) 78 | { 79 | sysFontDialog.ShowHelp = fontDialog.ShowHelp; 80 | sysFontDialog.ShowColor = fontDialog.ShowColor; 81 | sysFontDialog.ShowEffects = fontDialog.ShowEffects; 82 | sysFontDialog.ShowApply = fontDialog.ShowApply; 83 | sysFontDialog.MaxSize = fontDialog.MaxSize; 84 | sysFontDialog.Font = fontDialog.Font; 85 | sysFontDialog.FontMustExist = fontDialog.FontMustExist; 86 | sysFontDialog.AllowSimulations = fontDialog.AllowSimulations; 87 | sysFontDialog.AllowVectorFonts = fontDialog.AllowVectorFonts; 88 | sysFontDialog.Color = fontDialog.Color; 89 | sysFontDialog.AllowScriptChange = fontDialog.AllowScriptChange; 90 | sysFontDialog.AllowVerticalFonts = fontDialog.AllowVerticalFonts; 91 | sysFontDialog.FixedPitchOnly = fontDialog.FixedPitchOnly; 92 | sysFontDialog.MinSize = fontDialog.MinSize; 93 | sysFontDialog.ScriptsOnly = fontDialog.ScriptsOnly; 94 | 95 | if (sysFontDialog.ShowDialog(this) == DialogResult.OK) 96 | { 97 | this.ApplySysFont(); 98 | } 99 | } 100 | 101 | private void sysFontDialog_Apply(object sender, EventArgs e) 102 | { 103 | this.ApplySysFont(); 104 | } 105 | 106 | private void UpdatePreview() 107 | { 108 | previewLabel.Font = fontDialog.Font; 109 | previewLabel.ForeColor = fontDialog.Color; 110 | 111 | propertyGrid.Refresh(); 112 | } 113 | 114 | #endregion 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/GeneralDemonstrationForm.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 | 131, 17 125 | 126 | 127 | 128 | 129 | AAABAAQAMDAAAAEAIACoJQAARgAAACAgAAABACAAqBAAAO4lAAAYGAAAAQAgAIgJAACWNgAAEBAAAAEA 130 | IABoBAAAHkAAACgAAAAwAAAAYAAAAAEAIAAAAAAAgCUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 131 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 132 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 133 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 134 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 135 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 136 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 137 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 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AAD///////8AAP///////wAA/8AAAA//AAD/wAAAD/8AAP/AAAAP/wAA//////// 286 | AAD///////8AAP///////wAA////////AAD///////8AAP//AAH//wAA//8AAf//AAD//8AP//8AAP// 287 | 8B///wAA///wH///AAD///Af//8AAP//8B///wAA///wH///AAD///Af//8AAP//8B///wAA///wH/// 288 | AAD///Af//8AAP//8B///wAA///wH///AAD///Af//8AAP//8B///wAA///wH///AAD/8/Afn/8AAP/x 289 | 8B8f/wAA//HwHx//AAD/8fAfH/8AAP/w8B4f/wAA//AAAB//AAD/8AAAH/8AAP/wAAAf/wAA//AAAB// 290 | AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA////////AAAoAAAAIAAAAEAA 291 | AAABACAAAAAAAIAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 292 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 293 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 294 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 295 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 296 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 297 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 298 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAA 411 | AAAAAAAAY0Y4El5JNP9eSTO4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 412 | AAAAAAAAAAAAAGNGOBJeSTT/XkgztwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 413 | AAAAAAAAAAAAAAAAAABjRjgSXkk0/15IM7cAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 414 | AAAAAAAAAAAAAAAAAAAAAAAAY0Y4El5JNP9eSDO3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 415 | AAAAAAAAAAAAAAAAAABcRzJuAAAAAGNGOBJeSTT/XkgztwAAAABUVDgJXUkzaAAAAAAAAAAAAAAAAAAA 416 | AAAAAAAAAAAAAAAAAAAAAAAAXkkzxl9KNRhcRS4WXkk0/15JNLhVVSoGXEgzY1xJM4EAAAAAAAAAAAAA 417 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAF1JNJZeSTS4XUk0tF5JM7JdSTOyXUg0tF5JNLhdSTRXAAAAAAAA 418 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 419 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 420 | AAAAAAAAAAAAAAAAAAAAAAAA//8AAP//AADgDwAA4A8AAP//AAD4HwAA/D8AAPx/AAD8fwAA/H8AAPx/ 421 | AAD0TwAA8A8AAPAPAAD//wAA//8AAA== 422 | 423 | 424 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/GroupBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.ComponentModel.Design; 4 | using System.Drawing; 5 | using System.Drawing.Drawing2D; 6 | using System.Windows.Forms; 7 | 8 | namespace Cyotek.Windows.Forms 9 | { 10 | // Cyotek GroupBox Component 11 | // www.cyotek.com 12 | 13 | /// 14 | /// Represents a Windows control that displays a frame at the top of a group of controls with an optional caption and icon. 15 | /// 16 | [ToolboxItem(true)] 17 | [DefaultEvent("Click")] 18 | [DefaultProperty("Text")] 19 | [Designer("System.Windows.Forms.Design.GroupBoxDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] 20 | [Designer("System.Windows.Forms.Design.DocumentDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(IRootDesigner))] 21 | internal class GroupBox : System.Windows.Forms.GroupBox 22 | { 23 | #region Fields 24 | 25 | private Border3DSide _borders = Border3DSide.Top; 26 | 27 | private Pen _bottomPen; 28 | 29 | private Color _headerForeColor; 30 | 31 | private Size _iconMargin; 32 | 33 | private Image _image; 34 | 35 | private Color _lineColorBottom; 36 | 37 | private Color _lineColorTop; 38 | 39 | private bool _showBorders; 40 | 41 | private Pen _topPen; 42 | 43 | #endregion 44 | 45 | #region Constructors 46 | 47 | /// 48 | /// Initializes a new instance of the class. 49 | /// 50 | public GroupBox() 51 | { 52 | _showBorders = true; 53 | _iconMargin = new Size(0, 6); 54 | _lineColorBottom = SystemColors.ButtonHighlight; 55 | _lineColorTop = SystemColors.ButtonShadow; 56 | _headerForeColor = SystemColors.HotTrack; 57 | 58 | this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor, true); 59 | 60 | this.CreateResources(); 61 | } 62 | 63 | #endregion 64 | 65 | #region Properties 66 | 67 | [Category("Appearance")] 68 | [DefaultValue(typeof(Border3DSide), "Top")] 69 | public Border3DSide Borders 70 | { 71 | get { return _borders; } 72 | set 73 | { 74 | _borders = value; 75 | this.Invalidate(); 76 | } 77 | } 78 | 79 | /// 80 | /// Gets a rectangle that represents the dimensions of the . 81 | /// 82 | /// 83 | /// 84 | /// A with the dimensions of the . 85 | /// 86 | public override Rectangle DisplayRectangle 87 | { 88 | get 89 | { 90 | Size clientSize; 91 | int fontHeight; 92 | int imageSize; 93 | 94 | clientSize = base.ClientSize; 95 | fontHeight = this.Font.Height; 96 | 97 | if (_image != null) 98 | { 99 | imageSize = _iconMargin.Width + _image.Width + 3; 100 | } 101 | else 102 | { 103 | imageSize = 0; 104 | } 105 | 106 | return new Rectangle(3 + imageSize, fontHeight + 3, Math.Max(clientSize.Width - (imageSize + 6), 0), Math.Max((clientSize.Height - fontHeight) - 6, 0)); 107 | } 108 | } 109 | 110 | [Category("Appearance")] 111 | [DefaultValue(typeof(Color), "HotTrack")] 112 | public Color HeaderForeColor 113 | { 114 | get { return _headerForeColor; } 115 | set 116 | { 117 | _headerForeColor = value; 118 | this.CreateResources(); 119 | this.Invalidate(); 120 | } 121 | } 122 | 123 | /// 124 | /// Gets or sets the icon margin. 125 | /// 126 | /// The icon margin. 127 | [Category("Appearance")] 128 | [DefaultValue(typeof(Size), "0, 6")] 129 | public Size IconMargin 130 | { 131 | get { return _iconMargin; } 132 | set 133 | { 134 | _iconMargin = value; 135 | this.Invalidate(); 136 | } 137 | } 138 | 139 | /// 140 | /// Gets or sets the image to display. 141 | /// 142 | /// The image to display. 143 | [Browsable(true)] 144 | [Category("Appearance")] 145 | [DefaultValue(typeof(Image), "")] 146 | public Image Image 147 | { 148 | get { return _image; } 149 | set 150 | { 151 | _image = value; 152 | this.Invalidate(); 153 | } 154 | } 155 | 156 | /// 157 | /// Gets or sets the line color bottom. 158 | /// 159 | /// The line color bottom. 160 | [Browsable(true)] 161 | [Category("Appearance")] 162 | [DefaultValue(typeof(Color), "ButtonHighlight")] 163 | public Color LineColorBottom 164 | { 165 | get { return _lineColorBottom; } 166 | set 167 | { 168 | _lineColorBottom = value; 169 | this.CreateResources(); 170 | this.Invalidate(); 171 | } 172 | } 173 | 174 | /// 175 | /// Gets or sets the line color top. 176 | /// 177 | /// The line color top. 178 | [Browsable(true)] 179 | [Category("Appearance")] 180 | [DefaultValue(typeof(Color), "ButtonShadow")] 181 | public Color LineColorTop 182 | { 183 | get { return _lineColorTop; } 184 | set 185 | { 186 | _lineColorTop = value; 187 | this.CreateResources(); 188 | this.Invalidate(); 189 | } 190 | } 191 | 192 | [DefaultValue(true)] 193 | [Category("Appearance")] 194 | public bool ShowBorders 195 | { 196 | get { return _showBorders; } 197 | set 198 | { 199 | _showBorders = value; 200 | this.Invalidate(); 201 | } 202 | } 203 | 204 | /// 205 | /// Returns or sets the text displayed in this control. 206 | /// 207 | /// 208 | /// 209 | /// The text associated with this control. 210 | /// 211 | [Browsable(true)] 212 | [DefaultValue("")] 213 | public override string Text 214 | { 215 | get { return base.Text; } 216 | set 217 | { 218 | base.Text = value; 219 | this.Invalidate(); 220 | } 221 | } 222 | 223 | #endregion 224 | 225 | #region Methods 226 | 227 | /// 228 | /// Clean up any resources being used. 229 | /// 230 | /// true if managed resources should be disposed; otherwise, false. 231 | protected override void Dispose(bool disposing) 232 | { 233 | if (disposing) 234 | { 235 | this.CleanUpResources(); 236 | } 237 | 238 | base.Dispose(disposing); 239 | } 240 | 241 | /// 242 | /// Occurs when the control is to be painted. 243 | /// 244 | /// A that contains the event data. 245 | protected override void OnPaint(PaintEventArgs e) 246 | { 247 | SizeF size; 248 | int y; 249 | TextFormatFlags flags; 250 | Rectangle textBounds; 251 | 252 | flags = TextFormatFlags.WordEllipsis | TextFormatFlags.NoPrefix | TextFormatFlags.Left | TextFormatFlags.SingleLine; 253 | 254 | size = TextRenderer.MeasureText(e.Graphics, this.Text, this.Font, this.ClientSize, flags); 255 | y = (int)(size.Height + 3) / 2; 256 | textBounds = new Rectangle(1, 1, (int)size.Width, (int)size.Height); 257 | 258 | if (this.ShowBorders) 259 | { 260 | if ((_borders & Border3DSide.All) == Border3DSide.All) 261 | { 262 | e.Graphics.DrawRectangle(_bottomPen, 1, y + 1, this.Width - 2, this.Height - (y + 2)); 263 | e.Graphics.DrawRectangle(_topPen, 0, y, this.Width - 2, this.Height - (y + 2)); 264 | } 265 | else 266 | { 267 | if ((_borders & Border3DSide.Top) == Border3DSide.Top) 268 | { 269 | e.Graphics.DrawLine(_topPen, size.Width + 3, y, this.Width - 5, y); 270 | e.Graphics.DrawLine(_bottomPen, size.Width + 3, y + 1, this.Width - 5, y + 1); 271 | } 272 | 273 | if ((_borders & Border3DSide.Left) == Border3DSide.Left) 274 | { 275 | e.Graphics.DrawLine(_topPen, 0, y, 0, this.Height - 1); 276 | e.Graphics.DrawLine(_bottomPen, 1, y, 1, this.Height - 1); 277 | } 278 | 279 | if ((_borders & Border3DSide.Right) == Border3DSide.Right) 280 | { 281 | e.Graphics.DrawLine(_bottomPen, this.Width - 1, y, this.Width - 1, this.Height - 1); 282 | e.Graphics.DrawLine(_topPen, this.Width - 2, y, this.Width - 2, this.Height - 1); 283 | } 284 | 285 | if ((_borders & Border3DSide.Bottom) == Border3DSide.Bottom) 286 | { 287 | e.Graphics.DrawLine(_topPen, 0, this.Height - 2, this.Width, this.Height - 2); 288 | e.Graphics.DrawLine(_bottomPen, 0, this.Height - 1, this.Width, this.Height - 1); 289 | } 290 | } 291 | } 292 | 293 | // header text 294 | TextRenderer.DrawText(e.Graphics, this.Text, this.Font, textBounds, this.HeaderForeColor, flags); 295 | 296 | // draw the image 297 | if ((_image != null)) 298 | { 299 | e.Graphics.DrawImage(_image, this.Padding.Left + _iconMargin.Width, this.Padding.Top + (int)size.Height + _iconMargin.Height, _image.Width, _image.Height); 300 | } 301 | 302 | //draw a designtime outline 303 | if (this.DesignMode && (_borders & Border3DSide.All) != Border3DSide.All) 304 | { 305 | using (Pen pen = new Pen(SystemColors.ButtonShadow)) 306 | { 307 | pen.DashStyle = DashStyle.Dot; 308 | e.Graphics.DrawRectangle(pen, 0, 0, this.Width - 1, this.Height - 1); 309 | } 310 | } 311 | } 312 | 313 | /// 314 | /// Raises the event. 315 | /// 316 | /// An that contains the event data. 317 | protected override void OnSystemColorsChanged(EventArgs e) 318 | { 319 | base.OnSystemColorsChanged(e); 320 | 321 | this.CreateResources(); 322 | this.Invalidate(); 323 | } 324 | 325 | /// 326 | /// Cleans up GDI resources. 327 | /// 328 | private void CleanUpResources() 329 | { 330 | if (_topPen != null) 331 | { 332 | _topPen.Dispose(); 333 | } 334 | 335 | if (_bottomPen != null) 336 | { 337 | _bottomPen.Dispose(); 338 | } 339 | } 340 | 341 | /// 342 | /// Creates GDI resources. 343 | /// 344 | private void CreateResources() 345 | { 346 | this.CleanUpResources(); 347 | 348 | _topPen = new Pen(_lineColorTop); 349 | _bottomPen = new Pen(_lineColorBottom); 350 | } 351 | 352 | #endregion 353 | } 354 | } 355 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/MainMenuForm.cs: -------------------------------------------------------------------------------- 1 | /* Cyotek FontDialog 2 | * http://cyotek.com 3 | * http://cyotek.com/blog/tag/fontdialog 4 | * 5 | * Copyright © 2015 Cyotek Ltd. 6 | * 7 | * Licensed under the MIT License. See LICENSE.txt for the full text. 8 | */ 9 | 10 | using System; 11 | using System.Diagnostics; 12 | using System.Windows.Forms; 13 | 14 | namespace Cyotek.Windows.Forms.Demo 15 | { 16 | internal partial class MainMenuForm : AboutDialog 17 | { 18 | #region Constructors 19 | 20 | public MainMenuForm() 21 | { 22 | this.InitializeComponent(); 23 | } 24 | 25 | #endregion 26 | 27 | #region Methods 28 | 29 | protected override void OnLoad(EventArgs e) 30 | { 31 | TabPage demoPage; 32 | 33 | base.OnLoad(e); 34 | 35 | demoPage = new TabPage 36 | { 37 | UseVisualStyleBackColor = true, 38 | Padding = new Padding(9), 39 | Text = "Demonstrations" 40 | }; 41 | 42 | demoGroupBox.Dock = DockStyle.Fill; 43 | demoPage.Controls.Add(demoGroupBox); 44 | 45 | this.TabControl.TabPages.Insert(0, demoPage); 46 | this.TabControl.SelectedTab = demoPage; 47 | 48 | this.Text = FileVersionInfo.GetVersionInfo(this.GetType().Assembly.Location).Comments; 49 | } 50 | 51 | /// 52 | /// Raises the event. 53 | /// 54 | /// A that contains the event data. 55 | protected override void OnShown(EventArgs e) 56 | { 57 | base.OnShown(e); 58 | 59 | generalDemonstrationButton.Focus(); 60 | } 61 | 62 | private void generalDemonstrationButton_Click(object sender, EventArgs e) 63 | { 64 | this.ShowDemo(); 65 | } 66 | 67 | private void ShowDemo() where T : Form, new() 68 | { 69 | Cursor.Current = Cursors.WaitCursor; 70 | 71 | using (Form form = new T()) 72 | { 73 | form.ShowDialog(this); 74 | } 75 | } 76 | 77 | #endregion 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/MainMenuForm.designer.cs: -------------------------------------------------------------------------------- 1 | namespace Cyotek.Windows.Forms.Demo 2 | { 3 | partial class MainMenuForm 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(MainMenuForm)); 32 | this.demoGroupBox = new Cyotek.Windows.Forms.GroupBox(); 33 | this.generalDemonstrationButton = new System.Windows.Forms.Button(); 34 | this.demoGroupBox.SuspendLayout(); 35 | this.SuspendLayout(); 36 | // 37 | // demoGroupBox 38 | // 39 | this.demoGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 40 | | System.Windows.Forms.AnchorStyles.Left) 41 | | System.Windows.Forms.AnchorStyles.Right))); 42 | this.demoGroupBox.Controls.Add(this.generalDemonstrationButton); 43 | this.demoGroupBox.Location = new System.Drawing.Point(31, 65); 44 | this.demoGroupBox.Name = "demoGroupBox"; 45 | this.demoGroupBox.Size = new System.Drawing.Size(444, 426); 46 | this.demoGroupBox.TabIndex = 0; 47 | this.demoGroupBox.TabStop = false; 48 | this.demoGroupBox.Text = "Available Demonstrations"; 49 | // 50 | // generalDemonstrationButton 51 | // 52 | this.generalDemonstrationButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 53 | | System.Windows.Forms.AnchorStyles.Right))); 54 | this.generalDemonstrationButton.Location = new System.Drawing.Point(6, 22); 55 | this.generalDemonstrationButton.Name = "generalDemonstrationButton"; 56 | this.generalDemonstrationButton.Size = new System.Drawing.Size(432, 27); 57 | this.generalDemonstrationButton.TabIndex = 0; 58 | this.generalDemonstrationButton.Text = "&General Demonstration"; 59 | this.generalDemonstrationButton.UseVisualStyleBackColor = true; 60 | this.generalDemonstrationButton.Click += new System.EventHandler(this.generalDemonstrationButton_Click); 61 | // 62 | // MainMenuForm 63 | // 64 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); 65 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 66 | this.ClientSize = new System.Drawing.Size(615, 585); 67 | this.Controls.Add(this.demoGroupBox); 68 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 69 | this.Name = "MainMenuForm"; 70 | this.ShowIcon = true; 71 | this.ShowInTaskbar = true; 72 | this.Controls.SetChildIndex(this.demoGroupBox, 0); 73 | this.demoGroupBox.ResumeLayout(false); 74 | this.ResumeLayout(false); 75 | this.PerformLayout(); 76 | 77 | } 78 | 79 | #endregion 80 | 81 | private GroupBox demoGroupBox; 82 | private System.Windows.Forms.Button generalDemonstrationButton; 83 | 84 | 85 | 86 | } 87 | } 88 | 89 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/MainMenuForm.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 | 122 | 123 | AAABAAIAICAAAAEAIACoEAAAJgAAABAQAAABACAAaAQAAM4QAAAoAAAAIAAAAEAAAAABACAAAAAAAIAQ 124 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 125 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 126 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsKCQ/7CgkP+vn4//r5+P/66ejv+tnY3/rZ2N/6yc 127 | jP+snIz/q5uL/6ubi/+qmor/qpqK/6mZif+pmYn/qJiI/6iYiP+nl4f/p5eH/6aWhv+llYX/pZWF/6SU 128 | hP+klIT/o5OD/6OTg/+ikoL/opKC/6GRgf+hkYH/AAAAAAAAAACxoZH/7eXg/+3k3//s493/6+Lc/+vh 129 | 2//q4Nr/6d/Z/+ne2P/o3df/59zW/+fb1P/m2tP/5tnS/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+MiX//jHlv/4xZH/+MOL//jBhf/4wH//+L55//i8 168 | dP/0unH/t66W/2ehzf9Gm+b/QZrp/+3k3/+rm4v/9O/s//Tv7P/07+z/9O/s//Tv7P/07+z/9O/s/6ub 169 | i/8AAAAAAAAAALurm//59/X/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jHl//4xpL/+MSM//jC 170 | hv/4wID/9r57/7Gxov84pO//KqT3/y2c+P8wmPj/7eXg/6ubi//18e7/9fHu//Xx7v/18e7/9fHu//Xx 171 | 7v/18e7/q5uL/wAAAAAAAAAAu6ub//r49//4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jH 172 | l//4xpL/+MSN//jCh//ivY7/Warc/yK49/8lr/j/KaX4/y2c+P/u5uH/rJyM/6ycjP+snIz/rJyM/6yc 173 | jP+snIz/rJyM/6ycjP+snIz/AAAAAAAAAAC8rJz/+/n4//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jI 174 | mP/4yJj/+MiY//jHl//4xpL/+MSM/8S5pP8us/H/HMT4/yC6+P8lsPj/Kab4/+/n4v+snIz//////+HS 175 | yv/h0sr/4dLK/+HSyv/h0sr/4dLK/6ycjP8AAAAAAAAAALysnP/7+vn/+MiY//jImP/4yJj/+MiY//jI 176 | mP/4yJj/+MiY//jImP/4yJj/+MiY//jHl//4xpL/urit/yW99P8X0Pj/G8b4/yC9+P8ks/j/7+fj/62d 177 | jf//////8uvo//Do5P/t5eD/6+Ld/+ne2f/h0sr/rZ2N/wAAAAAAAAAAva2d//z7+v/4yJj/+MiY//jI 178 | mP/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jIl//XwaX/QbTq/xLY+P8X0Pj/G8f4/x++ 179 | +P/w6OT/rZ2N///////07uz/8uvo//Do5P/t5eD/6+Ld/+HSyv+tnY3/AAAAAAAAAAC9rZ3//fz7//jI 180 | mP/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//HGmv+HtMz/Hcv2/xPY 181 | 9/8X0Pj/G8f4//Dp5f+uno7///////by8P9YPSv/Ujoq/0w3KP/t5eD/4dLK/66ejv8AAAAAAAAAAL6u 182 | nv/9/fz/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY/+XE 183 | oP9xs9X/Lbzx/xzJ9v8dxff/8ern/6+fj///////+PXz//by8P9YPSv/8uvo//Do5P/h0sr/r5+P/wAA 184 | AAAAAAAAvq6e//7+/f/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jI 185 | mP/4yJj/+MiY//PGmf/Dvq7/lrLC/5Cvwv/y6+j/r5+P///////6+Pf/+PXz//by8P/07uz/8uvo/+HS 186 | yv+vn4//AAAAAAAAAAC/r5////////7+/f/9/fz//fz7//z7+v/7+vn/+/n4//r49//59/X/+fb0//j1 187 | 8//39PL/9/Px//by8P/28e//9fDt//Tv7P/07uv/8+3q//Ls6f+woJD///////////////////////// 188 | /////////////7CgkP8AAAAAAAAAAMCwoP+/r5//vq6e/76unv+9rZ3/va2d/7ysnP+8rJz/u6ub/7ur 189 | m/+6qpr/uqqa/7mpmf+5qZn/uKiY/7iomP+3p5f/tqaW/7amlv+1pZX/taWV/7SklP+0pJT/s6OT/7Oj 190 | k/+yopL/sqKS/7Ghkf+xoZH/sKCQ/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 191 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 192 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////+AAAABgAAAAYAAAAGAAAABgAAAAYAA 193 | AAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAA 194 | AAGAAAABg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jP8AAAAAAAAAALysnP/8+vn/98KP//fCj//3wo//98KP//fBjv/3wY3/8ern/62djf/28e//8ern/+3j 208 | 3/+tnY3/AAAAAAAAAAC9rZ3//fz8//fCj//3wo//98KP//fCj//3wo//98KP//Pt6f+uno7/+vj3/2lH 209 | Mf/x6uf/rp6O/wAAAAAAAAAAvq6e///////9/Pz//Pr5//r49//59vT/9/Px//bx7//07+z/sKCQ//// 210 | ///6+Pf/9vHv/7CgkP8AAAAAAAAAAMCwoP++rp7/va2d/7ysnP+7q5v/uqqa/7mpmf+4qJj/tqaW/7Wl 211 | lf+0pJT/s6OT/7Kikv+xoZH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 212 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIAB 213 | AACAAQAAgAEAAIABAACAAQAAgAEAAIABAAD//wAA 214 | 215 | 216 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/Program.cs: -------------------------------------------------------------------------------- 1 | /* Cyotek FontDialog 2 | * http://cyotek.com 3 | * http://cyotek.com/blog/tag/fontdialog 4 | * 5 | * Copyright © 2015 Cyotek Ltd. 6 | * 7 | * Licensed under the MIT License. See LICENSE.txt for the full text. 8 | */ 9 | 10 | using System; 11 | using System.Windows.Forms; 12 | 13 | namespace Cyotek.Windows.Forms.Demo 14 | { 15 | internal static class Program 16 | { 17 | #region Static Methods 18 | 19 | /// 20 | /// The main entry point for the application. 21 | /// 22 | [STAThread] 23 | private static void Main() 24 | { 25 | Application.EnableVisualStyles(); 26 | Application.SetCompatibleTextRenderingDefault(false); 27 | Application.Run(new GeneralDemonstrationForm()); 28 | } 29 | 30 | #endregion 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("Cyotek FontDialog Demonstration")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("Cyotek Ltd")] 9 | [assembly: AssemblyProduct("Cyotek FontDialog")] 10 | [assembly: AssemblyCopyright("Copyright © 2015 Cyotek Ltd. All Rights Reserved.")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | [assembly: ComVisible(false)] 14 | [assembly: CLSCompliant(true)] 15 | [assembly: Guid("2def2438-048b-48bf-8110-2d076e6d8d17")] 16 | [assembly: AssemblyVersion("1.0.0.0")] 17 | [assembly: AssemblyFileVersion("1.0.0.0")] 18 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.34014 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 Cyotek.Windows.Forms.Demo.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", "4.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("Cyotek.Windows.Forms.Demo.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 string similar to /* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */ 65 | ////* Author: Nicolas Hery - http://nicolashery.com */ 66 | ////* Version: 29d1c5bc36da364ad5aa86946d420b7bbc54a253 */ 67 | ////* Source: https://github.com/nicolahery/markdownpad-github */ 68 | /// 69 | ////* RESET 70 | ///=============================================================================*/ 71 | /// 72 | ///html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, s [rest of string was truncated]";. 73 | /// 74 | internal static string CSS { 75 | get { 76 | return ResourceManager.GetString("CSS", resourceCulture); 77 | } 78 | } 79 | 80 | /// 81 | /// Looks up a localized resource of type System.Drawing.Bitmap. 82 | /// 83 | internal static System.Drawing.Bitmap Icon { 84 | get { 85 | object obj = ResourceManager.GetObject("Icon", resourceCulture); 86 | return ((System.Drawing.Bitmap)(obj)); 87 | } 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/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=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 | 122 | ..\resources\markdownpad-github.css;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 123 | 124 | 125 | ..\..\..\resources\icon-32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/PropertyGrid.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Windows.Forms; 3 | 4 | namespace Cyotek.Windows.Forms.Demo 5 | { 6 | // Cyotek ImageBox 7 | // Copyright (c) 2010-2015 Cyotek Ltd. 8 | // http://cyotek.com 9 | // http://cyotek.com/blog/tag/imagebox 10 | 11 | // Licensed under the MIT License. See license.txt for the full text. 12 | 13 | // If you use this control in your applications, attribution, donations or contributions are welcome. 14 | 15 | internal class PropertyGrid : System.Windows.Forms.PropertyGrid 16 | { 17 | #region Methods 18 | 19 | public GridItem FindItem(string itemLabel) 20 | { 21 | // http://www.vb-helper.com/howto_net_select_propertygrid_item.html 22 | 23 | GridItem rootItem; 24 | GridItem matchingItem; 25 | Queue searchItems; 26 | 27 | matchingItem = null; 28 | 29 | // Find the GridItem root. 30 | rootItem = this.SelectedGridItem; 31 | while (rootItem.Parent != null) 32 | { 33 | rootItem = rootItem.Parent; 34 | } 35 | 36 | // Search the tree. 37 | searchItems = new Queue(); 38 | 39 | searchItems.Enqueue(rootItem); 40 | 41 | while (searchItems.Count != 0 && matchingItem == null) 42 | { 43 | GridItem checkItem; 44 | 45 | checkItem = searchItems.Dequeue(); 46 | 47 | if (checkItem.Label == itemLabel) 48 | { 49 | matchingItem = checkItem; 50 | } 51 | 52 | foreach (GridItem item in checkItem.GridItems) 53 | { 54 | searchItems.Enqueue(item); 55 | } 56 | } 57 | 58 | return matchingItem; 59 | } 60 | 61 | public void SelectItem(string itemLabel) 62 | { 63 | GridItem selection; 64 | 65 | selection = this.FindItem(itemLabel); 66 | if (selection != null) 67 | { 68 | try 69 | { 70 | this.SelectedGridItem = selection; 71 | } 72 | catch 73 | { 74 | // ignore 75 | } 76 | } 77 | } 78 | 79 | #endregion 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/Resources/markdownpad-github.css: -------------------------------------------------------------------------------- 1 | /* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */ 2 | /* Author: Nicolas Hery - http://nicolashery.com */ 3 | /* Version: 29d1c5bc36da364ad5aa86946d420b7bbc54a253 */ 4 | /* Source: https://github.com/nicolahery/markdownpad-github */ 5 | 6 | /* RESET 7 | =============================================================================*/ 8 | 9 | html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { 10 | margin: 0; 11 | padding: 0; 12 | border: 0; 13 | } 14 | 15 | /* BODY 16 | =============================================================================*/ 17 | 18 | body { 19 | font-family: Helvetica, arial, freesans, clean, sans-serif; 20 | font-size: 14px; 21 | line-height: 1.6; 22 | color: #333; 23 | background-color: #fff; 24 | padding: 6px; 25 | max-width: 960px; 26 | margin: 0 auto; 27 | } 28 | 29 | body>*:first-child { 30 | margin-top: 0 !important; 31 | } 32 | 33 | body>*:last-child { 34 | margin-bottom: 0 !important; 35 | } 36 | 37 | /* BLOCKS 38 | =============================================================================*/ 39 | 40 | p, blockquote, ul, ol, dl, table, pre { 41 | margin: 15px 0; 42 | } 43 | 44 | /* HEADERS 45 | =============================================================================*/ 46 | 47 | h1, h2, h3, h4, h5, h6 { 48 | margin: 20px 0 10px; 49 | padding: 0; 50 | font-weight: bold; 51 | -webkit-font-smoothing: antialiased; 52 | } 53 | 54 | h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code { 55 | font-size: inherit; 56 | } 57 | 58 | h1 { 59 | font-size: 28px; 60 | color: #000; 61 | } 62 | 63 | h2 { 64 | font-size: 24px; 65 | border-bottom: 1px solid #ccc; 66 | color: #000; 67 | } 68 | 69 | h3 { 70 | font-size: 18px; 71 | } 72 | 73 | h4 { 74 | font-size: 16px; 75 | } 76 | 77 | h5 { 78 | font-size: 14px; 79 | } 80 | 81 | h6 { 82 | color: #777; 83 | font-size: 14px; 84 | } 85 | 86 | body>h2:first-child, body>h1:first-child, body>h1:first-child+h2, body>h3:first-child, body>h4:first-child, body>h5:first-child, body>h6:first-child { 87 | margin-top: 0; 88 | padding-top: 0; 89 | } 90 | 91 | a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 { 92 | margin-top: 0; 93 | padding-top: 0; 94 | } 95 | 96 | h1+p, h2+p, h3+p, h4+p, h5+p, h6+p { 97 | margin-top: 10px; 98 | } 99 | 100 | /* LINKS 101 | =============================================================================*/ 102 | 103 | a { 104 | color: #4183C4; 105 | text-decoration: none; 106 | } 107 | 108 | a:hover { 109 | text-decoration: underline; 110 | } 111 | 112 | /* LISTS 113 | =============================================================================*/ 114 | 115 | ul, ol { 116 | padding-left: 30px; 117 | } 118 | 119 | ul li > :first-child, 120 | ol li > :first-child, 121 | ul li ul:first-of-type, 122 | ol li ol:first-of-type, 123 | ul li ol:first-of-type, 124 | ol li ul:first-of-type { 125 | margin-top: 0px; 126 | } 127 | 128 | ul ul, ul ol, ol ol, ol ul { 129 | margin-bottom: 0; 130 | } 131 | 132 | dl { 133 | padding: 0; 134 | } 135 | 136 | dl dt { 137 | font-size: 14px; 138 | font-weight: bold; 139 | font-style: italic; 140 | padding: 0; 141 | margin: 15px 0 5px; 142 | } 143 | 144 | dl dt:first-child { 145 | padding: 0; 146 | } 147 | 148 | dl dt>:first-child { 149 | margin-top: 0px; 150 | } 151 | 152 | dl dt>:last-child { 153 | margin-bottom: 0px; 154 | } 155 | 156 | dl dd { 157 | margin: 0 0 15px; 158 | padding: 0 15px; 159 | } 160 | 161 | dl dd>:first-child { 162 | margin-top: 0px; 163 | } 164 | 165 | dl dd>:last-child { 166 | margin-bottom: 0px; 167 | } 168 | 169 | /* CODE 170 | =============================================================================*/ 171 | 172 | pre, code, tt { 173 | font-size: 12px; 174 | font-family: Consolas, "Liberation Mono", Courier, monospace; 175 | } 176 | 177 | code, tt { 178 | margin: 0 0px; 179 | padding: 0px 0px; 180 | white-space: nowrap; 181 | border: 1px solid #eaeaea; 182 | background-color: #f8f8f8; 183 | border-radius: 3px; 184 | } 185 | 186 | pre>code { 187 | margin: 0; 188 | padding: 0; 189 | white-space: pre; 190 | border: none; 191 | background: transparent; 192 | } 193 | 194 | pre { 195 | background-color: #f8f8f8; 196 | border: 1px solid #ccc; 197 | font-size: 13px; 198 | line-height: 19px; 199 | overflow: auto; 200 | padding: 6px 10px; 201 | border-radius: 3px; 202 | } 203 | 204 | pre code, pre tt { 205 | background-color: transparent; 206 | border: none; 207 | } 208 | 209 | /* QUOTES 210 | =============================================================================*/ 211 | 212 | blockquote { 213 | border-left: 4px solid #DDD; 214 | padding: 0 15px; 215 | color: #777; 216 | } 217 | 218 | blockquote>:first-child { 219 | margin-top: 0px; 220 | } 221 | 222 | blockquote>:last-child { 223 | margin-bottom: 0px; 224 | } 225 | 226 | /* HORIZONTAL RULES 227 | =============================================================================*/ 228 | 229 | hr { 230 | clear: both; 231 | margin: 15px 0; 232 | height: 0px; 233 | overflow: hidden; 234 | border: none; 235 | background: transparent; 236 | border-bottom: 4px solid #ddd; 237 | padding: 0; 238 | } 239 | 240 | /* TABLES 241 | =============================================================================*/ 242 | 243 | table th { 244 | font-weight: bold; 245 | } 246 | 247 | table th, table td { 248 | border: 1px solid #ccc; 249 | padding: 6px 13px; 250 | } 251 | 252 | table tr { 253 | border-top: 1px solid #ccc; 254 | background-color: #fff; 255 | } 256 | 257 | table tr:nth-child(2n) { 258 | background-color: #f8f8f8; 259 | } 260 | 261 | /* IMAGES 262 | =============================================================================*/ 263 | 264 | img { 265 | max-width: 100% 266 | } -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog.Demo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog/Cyotek.Windows.Forms.FontDialog.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {CA50CA44-04D9-41BE-9BF7-E61E034B997D} 8 | Library 9 | Properties 10 | Cyotek.Windows.Forms 11 | Cyotek.Windows.Forms.FontDialog 12 | v3.5 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | bin\Release\Cyotek.Windows.Forms.FontDialog.XML 32 | 33 | 34 | true 35 | 36 | 37 | cyopublic.snk 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | Component 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 71 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog/Cyotek.Windows.Forms.FontDialog.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $id$ 5 | $version$ 6 | Cyotek FontDialog 7 | Cyotek 8 | Cyotek 9 | https://raw.githubusercontent.com/cyotek/Cyotek.Windows.Forms.FontDialog/master/LICENSE.txt 10 | https://github.com/cyotek/Cyotek.Windows.Forms.FontDialog 11 | https://raw.githubusercontent.com/cyotek/Cyotek.Windows.Forms.FontDialog/master/resources/icon-32.png 12 | false 13 | 14 | A drop in replacement for System.Windows.Forms.FontDialog, without the crash when selecting non-TrueType fonts 15 | 16 | 17 | A drop in replacement for System.Windows.Forms.FontDialog, without the crash when selecting non-TrueType fonts 18 | 19 | 20 | $copyright$ 21 | en-GB 22 | fontdialog choosefont font cyotek 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog/FontDialog.cs: -------------------------------------------------------------------------------- 1 | /* Cyotek FontDialog 2 | * http://cyotek.com 3 | * http://cyotek.com/blog/tag/fontdialog 4 | * 5 | * Copyright © 2015 Cyotek Ltd. 6 | * 7 | * Licensed under the MIT License. See LICENSE.txt for the full text. 8 | */ 9 | 10 | using System; 11 | using System.ComponentModel; 12 | using System.Drawing; 13 | using System.Runtime.InteropServices; 14 | using System.Windows.Forms; 15 | 16 | // https://msdn.microsoft.com/en-us/library/windows/desktop/ms646832(v=vs.85).aspx 17 | 18 | namespace Cyotek.Windows.Forms 19 | { 20 | /// 21 | /// Prompts the user to choose a font from among those installed on the local computer. 22 | /// 23 | /// 24 | [DefaultEvent("Apply")] 25 | [DefaultProperty("Font")] 26 | [Description("Displays a dialog box that prompts the user to choose a font from those installed on the local computer.")] 27 | public class FontDialog : CommonDialog 28 | { 29 | #region Fields 30 | 31 | private Font _font; 32 | 33 | private int _maxSize; 34 | 35 | private int _minSize; 36 | 37 | #endregion 38 | 39 | #region Constructors 40 | 41 | /// 42 | /// Initializes a new instance of the class. 43 | /// 44 | public FontDialog() 45 | { 46 | this.Reset(); 47 | } 48 | 49 | #endregion 50 | 51 | #region Events 52 | 53 | /// 54 | /// Occurs when the user clicks the Apply button in the font dialog box. 55 | /// 56 | [Description("Occurs when the user clicks the Apply button.")] 57 | public event EventHandler Apply; 58 | 59 | #endregion 60 | 61 | #region Properties 62 | 63 | /// 64 | /// Gets or sets a value indicating whether the user can change the character set specified in the Script combo box to display a character set other than the one currently displayed. 65 | /// 66 | /// 67 | /// true if the user can change the character set specified in the Script combo box; otherwise, false. The default value is true. 68 | /// 69 | [DefaultValue(true)] 70 | [Category("Behavior")] 71 | [Description("Controls whether the character set of the font can be changed.")] 72 | public bool AllowScriptChange { get; set; } 73 | 74 | /// 75 | /// Gets or sets a value indicating whether the dialog box allows graphics device interface (GDI) font simulations. 76 | /// 77 | /// 78 | /// true if font simulations are allowed; otherwise, false. The default value is true. 79 | /// 80 | [DefaultValue(true)] 81 | [Category("Behavior")] 82 | [Description("Controls whether GDI font simulations are allowed.")] 83 | public bool AllowSimulations { get; set; } 84 | 85 | /// 86 | /// Gets or sets a value indicating whether the dialog box allows vector font selections. 87 | /// 88 | /// 89 | /// true if vector fonts are allowed; otherwise, false. The default value is true. 90 | /// 91 | [DefaultValue(true)] 92 | [Category("Behavior")] 93 | [Description("Controls whether vector fonts can be selected.")] 94 | public bool AllowVectorFonts { get; set; } 95 | 96 | /// 97 | /// Gets or sets a value indicating whether the dialog box displays both vertical and horizontal fonts or only horizontal fonts. 98 | /// 99 | /// 100 | /// true if both vertical and horizontal fonts are allowed; otherwise, false. The default value is true. 101 | /// 102 | [DefaultValue(true)] 103 | [Category("Behavior")] 104 | [Description("Controls whether vertical fonts can be selected.")] 105 | public bool AllowVerticalFonts { get; set; } 106 | 107 | /// 108 | /// Gets or sets the selected font color. 109 | /// 110 | /// 111 | /// The color of the selected font. The default value is Black. 112 | /// 113 | [DefaultValue(typeof(Color), "Black")] 114 | [Category("Data")] 115 | [Description("The color selected in the dialog box.")] 116 | public Color Color { get; set; } 117 | 118 | /// 119 | /// Gets or sets a value indicating whether the dialog box allows only the selection of fixed-pitch fonts. 120 | /// 121 | /// 122 | /// true if only fixed-pitch fonts can be selected; otherwise, false. The default value is false. 123 | /// 124 | [DefaultValue(false)] 125 | [Category("Behavior")] 126 | [Description("Controls whether only fixed pitch fonts can be selected.")] 127 | public bool FixedPitchOnly { get; set; } 128 | 129 | /// 130 | /// Gets or sets the selected font. 131 | /// 132 | /// 133 | /// The selected font. 134 | /// 135 | [Category("Data")] 136 | [Description("The font selected in the dialog box.")] 137 | public Font Font 138 | { 139 | get 140 | { 141 | Font font; 142 | float fontSize; 143 | int minSize; 144 | int maxSize; 145 | 146 | font = _font ?? SystemFonts.DefaultFont; 147 | 148 | fontSize = font.SizeInPoints; 149 | 150 | // clamp the font to the minimum size if set 151 | minSize = this.MinSize; 152 | if (minSize > 0 && fontSize < minSize) 153 | { 154 | font = new Font(font.FontFamily, minSize, font.Style, GraphicsUnit.Point); 155 | } 156 | 157 | // clamp the font to the maximum size if set 158 | maxSize = this.MaxSize; 159 | if (maxSize > 0 && fontSize > maxSize) 160 | { 161 | font = new Font(font.FontFamily, maxSize, font.Style, GraphicsUnit.Point); 162 | } 163 | 164 | return font; 165 | } 166 | set { _font = value; } 167 | } 168 | 169 | /// 170 | /// Gets or sets a value indicating whether the dialog box specifies an error condition if the user attempts to select a font or style that does not exist. 171 | /// 172 | /// 173 | /// true if the dialog box specifies an error condition when the user tries to select a font or style that does not exist; otherwise, false. The default is false. 174 | /// 175 | [DefaultValue(false)] 176 | [Category("Behavior")] 177 | [Description("Controls whether to report an error if the selected font does not exist.")] 178 | public bool FontMustExist { get; set; } 179 | 180 | /// 181 | /// Gets or sets the maximum point size a user can select. 182 | /// 183 | /// 184 | /// The maximum point size a user can select. The default is 0. 185 | /// 186 | [DefaultValue(0)] 187 | [Category("Data")] 188 | [Description("The maximum point size that can be selected (or zero to disable).")] 189 | public int MaxSize 190 | { 191 | get { return _maxSize; } 192 | set 193 | { 194 | if (value < 0) 195 | { 196 | value = 0; 197 | } 198 | 199 | _maxSize = value; 200 | 201 | if (_maxSize > 0 && _maxSize < _minSize) 202 | { 203 | _minSize = _maxSize; 204 | } 205 | } 206 | } 207 | 208 | /// 209 | /// Gets or sets the minimum point size a user can select. 210 | /// 211 | /// 212 | /// The minimum point size a user can select. The default is 0. 213 | /// 214 | [DefaultValue(0)] 215 | [Category("Data")] 216 | [Description("The minimum point size that can be Selected (or zero to disable).")] 217 | public int MinSize 218 | { 219 | get { return _minSize; } 220 | set 221 | { 222 | if (value < 0) 223 | { 224 | value = 0; 225 | } 226 | 227 | _minSize = value; 228 | 229 | if (_maxSize > 0 && _maxSize < _minSize) 230 | { 231 | _maxSize = _minSize; 232 | } 233 | } 234 | } 235 | 236 | /// 237 | /// Gets or sets a value indicating whether the dialog box allows selection of fonts for all non-OEM and Symbol character sets, as well as the ANSI character set. 238 | /// 239 | /// 240 | /// true if selection of fonts for all non-OEM and Symbol character sets, as well as the ANSI character set, is allowed; otherwise, false. The default value is false. 241 | /// 242 | [DefaultValue(false)] 243 | [Category("Behavior")] 244 | [Description("Controls whether to exclude OEM and Symbol character sets.")] 245 | public bool ScriptsOnly { get; set; } 246 | 247 | /// 248 | /// Gets or sets a value indicating whether the dialog box contains an Apply button. 249 | /// 250 | /// 251 | /// true if the dialog box contains an Apply button; otherwise, false. The default value is false. 252 | /// 253 | [DefaultValue(false)] 254 | [Category("Behavior")] 255 | [Description("Controls whether to show the Apply button.")] 256 | public bool ShowApply { get; set; } 257 | 258 | /// 259 | /// Gets or sets a value indicating whether the dialog box displays the color choice. 260 | /// 261 | /// 262 | /// true if the dialog box displays the color choice; otherwise, false. The default value is false. 263 | /// 264 | [DefaultValue(false)] 265 | [Category("Behavior")] 266 | [Description("Controls whether to show a color choice.")] 267 | public bool ShowColor { get; set; } 268 | 269 | /// 270 | /// Gets or sets a value indicating whether the dialog box contains controls that allow the user to specify strikethrough, underline, and text color options. 271 | /// 272 | /// 273 | /// true if the dialog box contains controls to set strikethrough, underline, and text color options; otherwise, false. The default value is true. 274 | /// 275 | [DefaultValue(true)] 276 | [Category("Behavior")] 277 | [Description("Controls whether to show the underline, strikeout, and font color selections.")] 278 | public bool ShowEffects { get; set; } 279 | 280 | /// 281 | /// Gets or sets a value indicating whether the dialog box displays a Help button. 282 | /// 283 | /// 284 | /// true if the dialog box displays a Help button; otherwise, false. The default value is false. 285 | /// 286 | [DefaultValue(false)] 287 | [Category("Behavior")] 288 | [Description("Controls whether to show the Help button.")] 289 | public bool ShowHelp { get; set; } 290 | 291 | #endregion 292 | 293 | #region Methods 294 | 295 | /// 296 | /// When overridden in a derived class, resets the properties of a common dialog box to their default values. 297 | /// 298 | public override void Reset() 299 | { 300 | this.Color = Color.Black; 301 | this.AllowScriptChange = true; 302 | this.AllowSimulations = true; 303 | this.AllowVectorFonts = true; 304 | this.AllowVerticalFonts = true; 305 | this.ShowColor = false; 306 | this.FontMustExist = false; 307 | this.FixedPitchOnly = false; 308 | this.MaxSize = 0; 309 | this.MaxSize = 0; 310 | this.Font = null; 311 | this.ShowApply = false; 312 | this.ShowHelp = false; 313 | this.ShowEffects = true; 314 | } 315 | 316 | /// 317 | /// Retrieves a string that includes the name of the current font selected in the dialog box. 318 | /// 319 | public override string ToString() 320 | { 321 | return string.Concat(base.ToString(), ", Font: ", this.Font.ToString()); 322 | } 323 | 324 | /// 325 | /// Defines the common dialog box hook procedure that is overridden to add specific functionality to a common dialog box. 326 | /// 327 | /// 328 | /// A zero value if the default dialog box procedure processes the message; a nonzero value if the default dialog box procedure ignores the message. 329 | /// 330 | /// The handle to the dialog box window. The message being received. Additional information about the message. Additional information about the message. 331 | protected override IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) 332 | { 333 | // This code is lifted directly from System.Windows.Forms.FontDialog 334 | 335 | switch (msg) 336 | { 337 | case NativeMethods.WM_COMMAND: 338 | if ((int)wparam == 0x402) 339 | { 340 | NativeMethods.LOGFONT lf = new NativeMethods.LOGFONT(); 341 | NativeMethods.SendMessage(new HandleRef(null, hWnd), NativeMethods.WM_CHOOSEFONT_GETLOGFONT, 0, lf); 342 | this.UpdateFont(lf); 343 | int index = (int)NativeMethods.SendDlgItemMessage(new HandleRef(null, hWnd), 0x473, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 344 | if (index != NativeMethods.CB_ERR) 345 | { 346 | this.UpdateColor((int)NativeMethods.SendDlgItemMessage(new HandleRef(null, hWnd), 0x473, NativeMethods.CB_GETITEMDATA, (IntPtr)index, IntPtr.Zero)); 347 | } 348 | 349 | try 350 | { 351 | this.OnApply(EventArgs.Empty); 352 | } 353 | catch (Exception e) 354 | { 355 | Application.OnThreadException(e); 356 | } 357 | } 358 | break; 359 | case NativeMethods.WM_INITDIALOG: 360 | if (!this.ShowColor) 361 | { 362 | IntPtr hWndCtl = NativeMethods.GetDlgItem(new HandleRef(null, hWnd), NativeMethods.cmb4); 363 | NativeMethods.ShowWindow(new HandleRef(null, hWndCtl), NativeMethods.SW_HIDE); 364 | hWndCtl = NativeMethods.GetDlgItem(new HandleRef(null, hWnd), NativeMethods.stc4); 365 | NativeMethods.ShowWindow(new HandleRef(null, hWndCtl), NativeMethods.SW_HIDE); 366 | } 367 | break; 368 | } 369 | 370 | return base.HookProc(hWnd, msg, wparam, lparam); 371 | } 372 | 373 | /// 374 | /// Raises the event. 375 | /// 376 | /// The instance containing the event data. 377 | protected virtual void OnApply(EventArgs e) 378 | { 379 | EventHandler handler; 380 | 381 | handler = this.Apply; 382 | 383 | if (handler != null) 384 | { 385 | handler(this, e); 386 | } 387 | } 388 | 389 | /// 390 | /// When overridden in a derived class, specifies a common dialog box. 391 | /// 392 | /// 393 | /// true if the dialog box was successfully run; otherwise, false. 394 | /// 395 | /// A value that represents the window handle of the owner window for the common dialog box. 396 | protected override bool RunDialog(IntPtr hwndOwner) 397 | { 398 | NativeMethods.LOGFONT lf; 399 | NativeMethods.CHOOSEFONT cf; 400 | IntPtr plf; 401 | bool result; 402 | int minSize; 403 | int maxSize; 404 | bool showColor; 405 | 406 | lf = new NativeMethods.LOGFONT(); 407 | 408 | this.Font.ToLogFont(lf); 409 | 410 | plf = Marshal.AllocHGlobal(Marshal.SizeOf(lf)); 411 | Marshal.StructureToPtr(lf, plf, false); 412 | 413 | showColor = this.ShowColor || this.ShowEffects; 414 | 415 | cf = new NativeMethods.CHOOSEFONT(); 416 | cf.lStructSize = Marshal.SizeOf(typeof(NativeMethods.CHOOSEFONT)); 417 | cf.Flags = this.GetFlags(); 418 | cf.hwndOwner = hwndOwner; 419 | cf.lpfnHook = this.HookProc; 420 | 421 | minSize = this.MinSize; 422 | maxSize = this.MaxSize; 423 | if (minSize > 0 || maxSize > 0) 424 | { 425 | cf.nSizeMin = minSize; 426 | cf.nSizeMax = maxSize > 0 ? maxSize : int.MaxValue; 427 | } 428 | 429 | cf.rgbColors = ColorTranslator.ToWin32(showColor ? this.Color : Color.Black); 430 | 431 | cf.lpLogFont = plf; 432 | 433 | try 434 | { 435 | result = NativeMethods.ChooseFont(ref cf); 436 | 437 | if (result) 438 | { 439 | // create a managed font from the updated LOGFONT 440 | lf = (NativeMethods.LOGFONT)Marshal.PtrToStructure(plf, typeof(NativeMethods.LOGFONT)); 441 | if (!string.IsNullOrEmpty(lf.lfFaceName)) 442 | { 443 | this.UpdateFont(lf); 444 | } 445 | 446 | // and update the color 447 | if (showColor) 448 | { 449 | this.UpdateColor(cf.rgbColors); 450 | } 451 | } 452 | } 453 | finally 454 | { 455 | // always be freein' allocated memory! 456 | Marshal.FreeHGlobal(plf); 457 | } 458 | 459 | return result; 460 | } 461 | 462 | /// 463 | /// Gets the flags to apply to the CHOOSEFONT structure 464 | /// 465 | private int GetFlags() 466 | { 467 | NativeMethods.CHOOSEFONTFLAGS flags; 468 | 469 | flags = NativeMethods.CHOOSEFONTFLAGS.CF_INITTOLOGFONTSTRUCT | NativeMethods.CHOOSEFONTFLAGS.CF_TTONLY | NativeMethods.CHOOSEFONTFLAGS.CF_ENABLEHOOK; 470 | 471 | if (this.ShowApply) 472 | { 473 | flags |= NativeMethods.CHOOSEFONTFLAGS.CF_APPLY; 474 | } 475 | 476 | if (this.ShowEffects) 477 | { 478 | flags |= NativeMethods.CHOOSEFONTFLAGS.CF_EFFECTS; 479 | } 480 | 481 | if (this.FixedPitchOnly) 482 | { 483 | flags |= NativeMethods.CHOOSEFONTFLAGS.CF_FIXEDPITCHONLY; 484 | } 485 | 486 | if (this.FontMustExist) 487 | { 488 | flags |= NativeMethods.CHOOSEFONTFLAGS.CF_FORCEFONTEXIST; 489 | } 490 | 491 | if (this.MinSize != 0 || this.MaxSize != 0) 492 | { 493 | flags |= NativeMethods.CHOOSEFONTFLAGS.CF_LIMITSIZE; 494 | } 495 | 496 | if (!this.AllowScriptChange) 497 | { 498 | flags |= NativeMethods.CHOOSEFONTFLAGS.CF_NOSCRIPTSEL; 499 | } 500 | 501 | if (!this.AllowSimulations) 502 | { 503 | flags |= NativeMethods.CHOOSEFONTFLAGS.CF_NOSIMULATIONS; 504 | } 505 | 506 | if (!this.AllowVectorFonts) 507 | { 508 | flags |= NativeMethods.CHOOSEFONTFLAGS.CF_NOVERTFONTS; 509 | } 510 | 511 | if (this.ScriptsOnly) 512 | { 513 | flags |= NativeMethods.CHOOSEFONTFLAGS.CF_SCRIPTSONLY; 514 | ; 515 | } 516 | 517 | if (this.ShowHelp) 518 | { 519 | flags |= NativeMethods.CHOOSEFONTFLAGS.CF_SHOWHELP; 520 | } 521 | 522 | return (int)flags; 523 | } 524 | 525 | /// 526 | /// Resets the font. 527 | /// 528 | private void ResetFont() 529 | { 530 | this.Font = null; 531 | } 532 | 533 | /// 534 | /// Determine if we should serialize font. 535 | /// 536 | /// 537 | /// true if it succeeds, false if it fails. 538 | /// 539 | private bool ShouldSerializeFont() 540 | { 541 | return !this.Font.Equals(Control.DefaultFont); 542 | } 543 | 544 | /// 545 | /// Updates the color 546 | /// 547 | /// The OLE color value. 548 | private void UpdateColor(int rgb) 549 | { 550 | if (ColorTranslator.ToWin32(this.Color) != rgb) 551 | { 552 | this.Color = ColorTranslator.FromOle(rgb); 553 | } 554 | } 555 | 556 | /// 557 | /// Updates the font described by the specified LOGFONT structure 558 | /// 559 | /// The source font. 560 | private void UpdateFont(NativeMethods.LOGFONT lf) 561 | { 562 | Font font; 563 | 564 | try 565 | { 566 | // This one line is the whole point of having to write this class as it can 567 | // throw an exception, which System.Windows.Forms.FontDialog doesn't handle 568 | 569 | font = Font.FromLogFont(lf); 570 | } 571 | catch 572 | { 573 | font = null; 574 | } 575 | 576 | if (font != null) 577 | { 578 | this.Font = font; 579 | } 580 | } 581 | 582 | #endregion 583 | } 584 | } 585 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog/NativeConstants.cs: -------------------------------------------------------------------------------- 1 | /* Cyotek FontDialog 2 | * http://cyotek.com 3 | * http://cyotek.com/blog/tag/fontdialog 4 | * 5 | * Copyright © 2015 Cyotek Ltd. 6 | * 7 | * Licensed under the MIT License. See LICENSE.txt for the full text. 8 | */ 9 | 10 | using System; 11 | 12 | // ReSharper disable InconsistentNaming 13 | 14 | namespace Cyotek.Windows.Forms 15 | { 16 | internal static partial class NativeMethods 17 | { 18 | #region CHOOSEFONTFLAGS enum 19 | 20 | [Flags] 21 | public enum CHOOSEFONTFLAGS 22 | { 23 | CF_SCREENFONTS = 0x00000001, 24 | 25 | CF_PRINTERFONTS = 0x00000002, 26 | 27 | CF_BOTH = (CF_SCREENFONTS | CF_PRINTERFONTS), 28 | 29 | CF_SHOWHELP = 0x00000004, 30 | 31 | CF_ENABLEHOOK = 0x00000008, 32 | 33 | CF_ENABLETEMPLATE = 0x00000010, 34 | 35 | CF_ENABLETEMPLATEHANDLE = 0x00000020, 36 | 37 | CF_INITTOLOGFONTSTRUCT = 0x00000040, 38 | 39 | CF_USESTYLE = 0x00000080, 40 | 41 | CF_EFFECTS = 0x00000100, 42 | 43 | CF_APPLY = 0x00000200, 44 | 45 | CF_ANSIONLY = 0x00000400, 46 | 47 | CF_SCRIPTSONLY = CF_ANSIONLY, 48 | 49 | CF_NOVECTORFONTS = 0x00000800, 50 | 51 | CF_NOOEMFONTS = CF_NOVECTORFONTS, 52 | 53 | CF_NOSIMULATIONS = 0x00001000, 54 | 55 | CF_LIMITSIZE = 0x00002000, 56 | 57 | CF_FIXEDPITCHONLY = 0x00004000, 58 | 59 | CF_WYSIWYG = 0x00008000, 60 | 61 | CF_FORCEFONTEXIST = 0x00010000, 62 | 63 | CF_SCALABLEONLY = 0x00020000, 64 | 65 | CF_TTONLY = 0x00040000, 66 | 67 | CF_NOFACESEL = 0x00080000, 68 | 69 | CF_NOSTYLESEL = 0x00100000, 70 | 71 | CF_NOSIZESEL = 0x00200000, 72 | 73 | CF_SELECTSCRIPT = 0x00400000, 74 | 75 | CF_NOSCRIPTSEL = 0x00800000, 76 | 77 | CF_NOVERTFONTS = 0x01000000, 78 | 79 | CF_INACTIVEFONTS = 0x02000000 80 | } 81 | 82 | #endregion 83 | 84 | #region Constants 85 | 86 | public const int CB_ERR = (-1); 87 | 88 | public const int CB_GETCURSEL = 0x0147; 89 | 90 | public const int CB_GETITEMDATA = 0x0150; 91 | 92 | public const int cmb4 = 0x0473; 93 | 94 | public const int stc4 = 0x0443; 95 | 96 | public const int SW_HIDE = 0; 97 | 98 | public const int WM_CHOOSEFONT_GETLOGFONT = (WM_USER + 1); 99 | 100 | public const int WM_COMMAND = 0x0111; 101 | 102 | public const int WM_INITDIALOG = 0x0110; 103 | 104 | public const int WM_USER = 0x0400; 105 | 106 | #endregion 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog/NativeMethods.cs: -------------------------------------------------------------------------------- 1 | /* Cyotek FontDialog 2 | * http://cyotek.com 3 | * http://cyotek.com/blog/tag/fontdialog 4 | * 5 | * Copyright © 2015 Cyotek Ltd. 6 | * 7 | * Licensed under the MIT License. See LICENSE.txt for the full text. 8 | */ 9 | 10 | using System; 11 | using System.Runtime.InteropServices; 12 | 13 | // ReSharper disable InconsistentNaming 14 | 15 | namespace Cyotek.Windows.Forms 16 | { 17 | internal static partial class NativeMethods 18 | { 19 | #region Externals 20 | 21 | [DllImport("comdlg32.dll", CharSet = CharSet.Auto, SetLastError = true)] 22 | public static extern bool ChooseFont(ref CHOOSEFONT cf); 23 | 24 | [DllImport("user32.dll")] 25 | public static extern IntPtr GetDlgItem(HandleRef hDlg, int nIDDlgItem); 26 | 27 | [DllImport("kernel32.dll", CharSet = CharSet.Auto)] 28 | public static extern IntPtr GetModuleHandle(string modName); 29 | 30 | [DllImport("user32.dll")] 31 | public static extern IntPtr SendDlgItemMessage(HandleRef hDlg, int nIDDlgItem, int Msg, IntPtr wParam, IntPtr lParam); 32 | 33 | [DllImport("user32.dll")] 34 | public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In] [Out] LOGFONT lParam); 35 | 36 | [DllImport("user32.dll")] 37 | public static extern bool ShowWindow(HandleRef hWnd, int nCmdShow); 38 | 39 | #endregion 40 | 41 | #region Delegates 42 | 43 | public delegate IntPtr WndProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); 44 | 45 | #endregion 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog/NativeStructs.cs: -------------------------------------------------------------------------------- 1 | /* Cyotek FontDialog 2 | * http://cyotek.com 3 | * http://cyotek.com/blog/tag/fontdialog 4 | * 5 | * Copyright © 2015 Cyotek Ltd. 6 | * 7 | * Licensed under the MIT License. See LICENSE.txt for the full text. 8 | */ 9 | 10 | using System; 11 | using System.Runtime.InteropServices; 12 | 13 | // ReSharper disable InconsistentNaming 14 | 15 | // http://www.pinvoke.net/default.aspx/comdlg32.choosefont 16 | 17 | namespace Cyotek.Windows.Forms 18 | { 19 | internal static partial class NativeMethods 20 | { 21 | #region Nested type: CHOOSEFONT 22 | 23 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] 24 | public struct CHOOSEFONT 25 | { 26 | public int lStructSize; 27 | 28 | public IntPtr hwndOwner; // caller's window handle 29 | 30 | public IntPtr hDC; // printer DC/IC or NULL 31 | 32 | public IntPtr lpLogFont; // ptr. to a LOGFONT struct 33 | 34 | public int iPointSize; // 10 * size in points of selected font 35 | 36 | public int Flags; // enum. type flags 37 | 38 | public int rgbColors; // returned text color 39 | 40 | public IntPtr lCustData; // data passed to hook fn. 41 | 42 | public WndProc lpfnHook; // ptr. to hook function 43 | 44 | public string lpTemplateName; // custom template name 45 | 46 | public IntPtr hInstance; // instance handle of.EXE that 47 | 48 | // contains cust. dlg. template 49 | public string lpszStyle; // return the style field here 50 | 51 | // must be LF_FACESIZE or bigger 52 | public short nFontType; // same value reported to the EnumFonts 53 | 54 | // call back with the extra FONTTYPE_ 55 | // bits added 56 | private readonly short __MISSING_ALIGNMENT__; // minimum pt size allowed & 57 | 58 | public int nSizeMin; // max pt size allowed if 59 | 60 | public int nSizeMax; // CF_LIMITSIZE is used 61 | } 62 | 63 | #endregion 64 | 65 | #region Nested type: LOGFONT 66 | 67 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] 68 | public class LOGFONT 69 | { 70 | public int lfHeight; 71 | 72 | public int lfWidth; 73 | 74 | public int lfEscapement; 75 | 76 | public int lfOrientation; 77 | 78 | public int lfWeight; 79 | 80 | public byte lfItalic; 81 | 82 | public byte lfUnderline; 83 | 84 | public byte lfStrikeOut; 85 | 86 | public byte lfCharSet; 87 | 88 | public byte lfOutPrecision; 89 | 90 | public byte lfClipPrecision; 91 | 92 | public byte lfQuality; 93 | 94 | public byte lfPitchAndFamily; 95 | 96 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] 97 | public string lfFaceName; 98 | } 99 | 100 | #endregion 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("Cyotek FontDialog Library")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("Cyotek Ltd")] 9 | [assembly: AssemblyProduct("Cyotek FontDialog Library")] 10 | [assembly: AssemblyCopyright("Copyright © 2015 Cyotek Ltd. All Rights Reserved.")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | [assembly: ComVisible(false)] 14 | [assembly: CLSCompliant(true)] 15 | [assembly: Guid("37b8807c-90b5-4002-bbca-26e4f002f51f")] 16 | [assembly: AssemblyVersion("1.0.0.0")] 17 | [assembly: AssemblyFileVersion("1.0.1.0")] 18 | [assembly: AssemblyInformationalVersion("1.0.1")] 19 | -------------------------------------------------------------------------------- /src/Cyotek.Windows.Forms.FontDialog/cyopublic.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyotek/Cyotek.Windows.Forms.FontDialog/cfca735fa684d828a444277788be086ae7c94928/src/Cyotek.Windows.Forms.FontDialog/cyopublic.snk --------------------------------------------------------------------------------