├── CustomMessageBox ├── obj │ └── Debug │ │ ├── CustomMessageBox.csproj.AssemblyReference.cache │ │ ├── CustomMessageBox.csproj.CoreCompileInputs.cache │ │ ├── CustomMessageBox.exe │ │ ├── CustomMessageBox.pdb │ │ ├── CustomMessageBox.Form1.resources │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ ├── TempPE │ │ └── Properties.Resources.Designer.cs.dll │ │ ├── CustomMessageBox.csproj.GenerateResource.cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── CustomMessageBox.Private.FormMessageBox.resources │ │ ├── CustomMessageBox.Properties.Resources.resources │ │ └── CustomMessageBox.csproj.FileListAbsolute.txt ├── Resources │ ├── chat.png │ ├── error.png │ ├── question.png │ ├── exclamation.png │ └── information.png ├── bin │ └── Debug │ │ ├── CustomMessageBox.exe │ │ ├── CustomMessageBox.pdb │ │ └── CustomMessageBox.exe.config ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Program.cs ├── RJMessageBox.cs ├── CustomMessageBox.csproj ├── Test │ ├── Form1.resx │ ├── Form1.cs │ └── Form1.Designer.cs ├── FormMessageBox.resx ├── FormMessageBox.Designer.cs └── FormMessageBox.cs ├── README.md ├── CustomMessageBox.sln └── LICENSE /CustomMessageBox/obj/Debug/CustomMessageBox.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- 1 | MBRSC -------------------------------------------------------------------------------- /CustomMessageBox/obj/Debug/CustomMessageBox.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 8ca0ce348eecd8eb4751a53f7aa1c133647735f3 2 | -------------------------------------------------------------------------------- /CustomMessageBox/Resources/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/Resources/chat.png -------------------------------------------------------------------------------- /CustomMessageBox/Resources/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/Resources/error.png -------------------------------------------------------------------------------- /CustomMessageBox/Resources/question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/Resources/question.png -------------------------------------------------------------------------------- /CustomMessageBox/Resources/exclamation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/Resources/exclamation.png -------------------------------------------------------------------------------- /CustomMessageBox/Resources/information.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/Resources/information.png -------------------------------------------------------------------------------- /CustomMessageBox/bin/Debug/CustomMessageBox.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/bin/Debug/CustomMessageBox.exe -------------------------------------------------------------------------------- /CustomMessageBox/bin/Debug/CustomMessageBox.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/bin/Debug/CustomMessageBox.pdb -------------------------------------------------------------------------------- /CustomMessageBox/obj/Debug/CustomMessageBox.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/obj/Debug/CustomMessageBox.exe -------------------------------------------------------------------------------- /CustomMessageBox/obj/Debug/CustomMessageBox.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/obj/Debug/CustomMessageBox.pdb -------------------------------------------------------------------------------- /CustomMessageBox/obj/Debug/CustomMessageBox.Form1.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/obj/Debug/CustomMessageBox.Form1.resources -------------------------------------------------------------------------------- /CustomMessageBox/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /CustomMessageBox/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll -------------------------------------------------------------------------------- /CustomMessageBox/obj/Debug/CustomMessageBox.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/obj/Debug/CustomMessageBox.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /CustomMessageBox/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /CustomMessageBox/obj/Debug/CustomMessageBox.Private.FormMessageBox.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/obj/Debug/CustomMessageBox.Private.FormMessageBox.resources -------------------------------------------------------------------------------- /CustomMessageBox/obj/Debug/CustomMessageBox.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RJCodeAdvance/CustomMessageBox/HEAD/CustomMessageBox/obj/Debug/CustomMessageBox.Properties.Resources.resources -------------------------------------------------------------------------------- /CustomMessageBox/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CustomMessageBox/bin/Debug/CustomMessageBox.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CustomMessageBox 2 | Custom MessageBox - C# & Windows Forms 3 |

VIDEO:

4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /CustomMessageBox/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CustomMessageBox/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace CustomMessageBox 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Form1()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /CustomMessageBox/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | 12 | namespace CustomMessageBox.Properties 13 | { 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 17 | { 18 | 19 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 20 | 21 | public static Settings Default 22 | { 23 | get 24 | { 25 | return defaultInstance; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /CustomMessageBox.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31829.152 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomMessageBox", "CustomMessageBox\CustomMessageBox.csproj", "{99054420-DE83-4AF4-9F65-7CE1D51A5561}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {99054420-DE83-4AF4-9F65-7CE1D51A5561}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {99054420-DE83-4AF4-9F65-7CE1D51A5561}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {99054420-DE83-4AF4-9F65-7CE1D51A5561}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {99054420-DE83-4AF4-9F65-7CE1D51A5561}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {6814ACC7-5D1A-4E13-86C1-283BF26AC6C6} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /CustomMessageBox/obj/Debug/CustomMessageBox.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\RJ Code Advance\source\repos\CustomMessageBox\CustomMessageBox\bin\Debug\CustomMessageBox.exe.config 2 | C:\Users\RJ Code Advance\source\repos\CustomMessageBox\CustomMessageBox\bin\Debug\CustomMessageBox.exe 3 | C:\Users\RJ Code Advance\source\repos\CustomMessageBox\CustomMessageBox\bin\Debug\CustomMessageBox.pdb 4 | C:\Users\RJ Code Advance\source\repos\CustomMessageBox\CustomMessageBox\obj\Debug\CustomMessageBox.csproj.AssemblyReference.cache 5 | C:\Users\RJ Code Advance\source\repos\CustomMessageBox\CustomMessageBox\obj\Debug\CustomMessageBox.Properties.Resources.resources 6 | C:\Users\RJ Code Advance\source\repos\CustomMessageBox\CustomMessageBox\obj\Debug\CustomMessageBox.csproj.GenerateResource.cache 7 | C:\Users\RJ Code Advance\source\repos\CustomMessageBox\CustomMessageBox\obj\Debug\CustomMessageBox.csproj.CoreCompileInputs.cache 8 | C:\Users\RJ Code Advance\source\repos\CustomMessageBox\CustomMessageBox\obj\Debug\CustomMessageBox.exe 9 | C:\Users\RJ Code Advance\source\repos\CustomMessageBox\CustomMessageBox\obj\Debug\CustomMessageBox.pdb 10 | C:\Users\RJ Code Advance\source\repos\CustomMessageBox\CustomMessageBox\obj\Debug\CustomMessageBox.Private.FormMessageBox.resources 11 | C:\Users\RJ Code Advance\source\repos\CustomMessageBox\CustomMessageBox\obj\Debug\CustomMessageBox.Form1.resources 12 | -------------------------------------------------------------------------------- /CustomMessageBox/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("CustomMessageBox")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("CustomMessageBox")] 13 | [assembly: AssemblyCopyright("Copyright © 2021")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("99054420-de83-4af4-9f65-7ce1d51a5561")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /CustomMessageBox/RJMessageBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Forms; 7 | using CustomMessageBox.Private; 8 | 9 | namespace CustomMessageBox 10 | { 11 | public abstract class RJMessageBox 12 | { 13 | public static DialogResult Show(string text) 14 | { 15 | DialogResult result; 16 | using (var msgForm = new FormMessageBox(text)) 17 | result = msgForm.ShowDialog(); 18 | return result; 19 | } 20 | public static DialogResult Show(string text, string caption) 21 | { 22 | DialogResult result; 23 | using (var msgForm = new FormMessageBox(text, caption)) 24 | result = msgForm.ShowDialog(); 25 | return result; 26 | } 27 | public static DialogResult Show(string text, string caption, MessageBoxButtons buttons) 28 | { 29 | DialogResult result; 30 | using (var msgForm = new FormMessageBox(text, caption, buttons)) 31 | result = msgForm.ShowDialog(); 32 | return result; 33 | } 34 | public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon) 35 | { 36 | DialogResult result; 37 | using (var msgForm = new FormMessageBox(text, caption, buttons, icon)) 38 | result = msgForm.ShowDialog(); 39 | return result; 40 | } 41 | public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton) 42 | { 43 | DialogResult result; 44 | using (var msgForm = new FormMessageBox(text, caption, buttons, icon, defaultButton)) 45 | result = msgForm.ShowDialog(); 46 | return result; 47 | } 48 | 49 | /*-> IWin32Window Owner: 50 | * Displays a message box in front of the specified object and with the other specified parameters. 51 | * An implementation of IWin32Window that will own the modal dialog box.*/ 52 | public static DialogResult Show(IWin32Window owner, string text) 53 | { 54 | DialogResult result; 55 | using (var msgForm = new FormMessageBox(text)) 56 | result = msgForm.ShowDialog(owner); 57 | return result; 58 | } 59 | public static DialogResult Show(IWin32Window owner, string text, string caption) 60 | { 61 | DialogResult result; 62 | using (var msgForm = new FormMessageBox(text, caption)) 63 | result = msgForm.ShowDialog(owner); 64 | return result; 65 | } 66 | public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons) 67 | { 68 | DialogResult result; 69 | using (var msgForm = new FormMessageBox(text, caption, buttons)) 70 | result = msgForm.ShowDialog(owner); 71 | return result; 72 | } 73 | public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon) 74 | { 75 | DialogResult result; 76 | using (var msgForm = new FormMessageBox(text, caption, buttons, icon)) 77 | result = msgForm.ShowDialog(owner); 78 | return result; 79 | } 80 | public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton) 81 | { 82 | DialogResult result; 83 | using (var msgForm = new FormMessageBox(text, caption, buttons, icon, defaultButton)) 84 | result = msgForm.ShowDialog(owner); 85 | return result; 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /CustomMessageBox/CustomMessageBox.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {99054420-DE83-4AF4-9F65-7CE1D51A5561} 8 | WinExe 9 | CustomMessageBox 10 | CustomMessageBox 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Form 50 | 51 | 52 | FormMessageBox.cs 53 | 54 | 55 | 56 | 57 | 58 | Form 59 | 60 | 61 | Form1.cs 62 | 63 | 64 | FormMessageBox.cs 65 | 66 | 67 | ResXFileCodeGenerator 68 | Resources.Designer.cs 69 | Designer 70 | 71 | 72 | True 73 | Resources.resx 74 | True 75 | 76 | 77 | Form1.cs 78 | 79 | 80 | SettingsSingleFileGenerator 81 | Settings.Designer.cs 82 | 83 | 84 | True 85 | Settings.settings 86 | True 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /CustomMessageBox/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace CustomMessageBox.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CustomMessageBox.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap chat { 67 | get { 68 | object obj = ResourceManager.GetObject("chat", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap error { 77 | get { 78 | object obj = ResourceManager.GetObject("error", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Drawing.Bitmap. 85 | /// 86 | internal static System.Drawing.Bitmap exclamation { 87 | get { 88 | object obj = ResourceManager.GetObject("exclamation", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// Looks up a localized resource of type System.Drawing.Bitmap. 95 | /// 96 | internal static System.Drawing.Bitmap information { 97 | get { 98 | object obj = ResourceManager.GetObject("information", resourceCulture); 99 | return ((System.Drawing.Bitmap)(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// Looks up a localized resource of type System.Drawing.Bitmap. 105 | /// 106 | internal static System.Drawing.Bitmap question { 107 | get { 108 | object obj = ResourceManager.GetObject("question", resourceCulture); 109 | return ((System.Drawing.Bitmap)(obj)); 110 | } 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /CustomMessageBox/Test/Form1.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /CustomMessageBox/FormMessageBox.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /CustomMessageBox/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\chat.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Resources\error.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Resources\exclamation.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Resources\information.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | ..\Resources\question.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | -------------------------------------------------------------------------------- /CustomMessageBox/Test/Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace CustomMessageBox 12 | { 13 | public partial class Form1 : Form 14 | { 15 | //More Inf. https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.messagebox?view=windowsdesktop-6.0 16 | 17 | public Form1() 18 | { 19 | InitializeComponent(); 20 | } 21 | 22 | //-> Text-Only Message Box 23 | private void btnMsgText_Click(object sender, EventArgs e) 24 | { 25 | labelDialogResult.Text = "Dialog Box Result"; 26 | //It is optional to save the Dialog Result, 27 | //use it when you need to know which button or action the user selected, 28 | //and do a specific function/task according to the dialogue result. 29 | //-| For Example: 30 | DialogResult result = RJMessageBox.Show("This is an example of a Text-Only Message Box."); 31 | if (result == DialogResult.OK) 32 | labelDialogResult.Text = "You have selected the OK BUTTON"; 33 | else labelDialogResult.Text = "You have selected CANCEL"; 34 | 35 | //Many times we only need to display a message box, without the need to retrieve the button or action selected by the user. 36 | //-| For Example: 37 | //RJMessageBox.Show("This is an example of a Text-Only Message Box."); 38 | } 39 | 40 | //-> Text + Caption Message Box 41 | private void btnMsgTextCaption1_Click(object sender, EventArgs e) 42 | { 43 | labelDialogResult.Text = "Dialog Box Result"; 44 | 45 | DialogResult result = RJMessageBox.Show("This is an example of a Text + Caption Message Box.", 46 | "Important Message"); 47 | labelDialogResult.Text = result.ToString() + " Selected"; 48 | } 49 | private void btnMsgTextCaption2_Click(object sender, EventArgs e) 50 | { 51 | labelDialogResult.Text = "Dialog Box Result"; 52 | var result = RJMessageBox.Show("Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\n\nWhy do we use it?\n\nIt is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).", 53 | "System: Save Changes"); 54 | labelDialogResult.Text = result.ToString() + " Selected"; 55 | } 56 | 57 | //-> Buttons Message Box 58 | private void btnMsgOk_Click(object sender, EventArgs e) 59 | { 60 | labelDialogResult.Text = "Dialog Box Result"; 61 | var result = RJMessageBox.Show("This is an example of an OK Button Message Box.", 62 | "OK Button", 63 | MessageBoxButtons.OK); 64 | labelDialogResult.Text = result.ToString() + " Selected"; 65 | } 66 | private void btnMsgOkCancel_Click(object sender, EventArgs e) 67 | { 68 | labelDialogResult.Text = "Dialog Box Result"; 69 | var result = RJMessageBox.Show("This is an example of an OK, Cancel Button Message Box.", 70 | "OK-Cancel Button", 71 | MessageBoxButtons.OKCancel); 72 | labelDialogResult.Text = result.ToString() + " Selected"; 73 | } 74 | private void btnMsgAbortRetryIgnore_Click(object sender, EventArgs e) 75 | { 76 | labelDialogResult.Text = "Dialog Box Result"; 77 | var result = RJMessageBox.Show("This is an example of an Abort, Retry, Ignore Button Message Box.", 78 | "Abort-Retry-Ignore Button", 79 | MessageBoxButtons.AbortRetryIgnore); 80 | labelDialogResult.Text = result.ToString() + " Selected"; 81 | } 82 | private void btnMsgYesNo_Click(object sender, EventArgs e) 83 | { 84 | labelDialogResult.Text = "Dialog Box Result"; 85 | var result = RJMessageBox.Show("This is an example of an Yes, No Button Message Box.", 86 | "Yes-No Button", 87 | MessageBoxButtons.YesNo); 88 | labelDialogResult.Text = result.ToString() +" Selected"; 89 | } 90 | private void btnMsgYesNoCancel_Click(object sender, EventArgs e) 91 | { 92 | labelDialogResult.Text = "Dialog Box Result"; 93 | var result = RJMessageBox.Show("This is an example of an Yes, No, Cancel Button Message Box.", 94 | "Yes-No-Cancel Button", 95 | MessageBoxButtons.YesNoCancel); 96 | labelDialogResult.Text = result.ToString() +" Selected"; 97 | } 98 | private void btnMsgRetryCancel_Click(object sender, EventArgs e) 99 | { 100 | labelDialogResult.Text = "Dialog Box Result"; 101 | var result = RJMessageBox.Show("This is an example of an Retry, Cancel Button Message Box.", 102 | "Retry-Cancel Button", 103 | MessageBoxButtons.RetryCancel); 104 | labelDialogResult.Text = result.ToString() + " Selected"; 105 | } 106 | 107 | //-> Icons Message Box 108 | private void btnMsgQuestion_Click(object sender, EventArgs e) 109 | { 110 | labelDialogResult.Text = "Dialog Box Result"; 111 | var result = RJMessageBox.Show("This is an example of an Question Icon Message Box.", 112 | "Question Icon", 113 | MessageBoxButtons.OKCancel, 114 | MessageBoxIcon.Question); 115 | labelDialogResult.Text = result.ToString() + " Selected"; 116 | } 117 | private void btnMsgWarning_Click(object sender, EventArgs e) 118 | { 119 | labelDialogResult.Text = "Dialog Box Result"; 120 | var result = RJMessageBox.Show("This is an example of an Warning-Exclamation Icon Message Box.", 121 | "Warning-Exclamation Icon", 122 | MessageBoxButtons.YesNoCancel, 123 | MessageBoxIcon.Warning); 124 | labelDialogResult.Text = result.ToString() + " Selected"; 125 | } 126 | private void btnMsgError_Click(object sender, EventArgs e) 127 | { 128 | labelDialogResult.Text = "Dialog Box Result"; 129 | var result = RJMessageBox.Show("This is an example of an Error-Stop Icon Message Box.", 130 | "Error-Stop Icon", 131 | MessageBoxButtons.RetryCancel, 132 | MessageBoxIcon.Error); 133 | labelDialogResult.Text = result.ToString() + " Selected"; 134 | } 135 | private void btnMsgInformation_Click(object sender, EventArgs e) 136 | { 137 | labelDialogResult.Text = "Dialog Box Result"; 138 | var result = RJMessageBox.Show("This is an example of an Information Icon Message Box.", 139 | "Information Icon", 140 | MessageBoxButtons.OK, 141 | MessageBoxIcon.Information); 142 | labelDialogResult.Text = result.ToString() + " Selected"; 143 | } 144 | 145 | //-> Default Button 146 | private void btnMsgButton1_Click(object sender, EventArgs e) 147 | { 148 | labelDialogResult.Text = "Dialog Box Result"; 149 | var result = RJMessageBox.Show("This is an example of a Message Box that sets Button1 as the Default Selected Button.\nThat is, pressing the Enter Key selects the Button1.", 150 | "Warning-Exclamation Icon", 151 | MessageBoxButtons.YesNoCancel, 152 | MessageBoxIcon.Warning, 153 | MessageBoxDefaultButton.Button1); 154 | labelDialogResult.Text = result.ToString() + " Selected"; 155 | } 156 | private void btnMsgButton2_Click(object sender, EventArgs e) 157 | { 158 | labelDialogResult.Text = "Dialog Box Result"; 159 | var result = RJMessageBox.Show("This is an example of a Message Box that sets Button2 as the Default Selected Button.\nThat is, pressing the Enter Key selects the Button2.", 160 | "Warning-Exclamation Icon", 161 | MessageBoxButtons.RetryCancel, 162 | MessageBoxIcon.Information, 163 | MessageBoxDefaultButton.Button2); 164 | labelDialogResult.Text = result.ToString() + " Selected"; 165 | } 166 | private void btnMsgButton3_Click(object sender, EventArgs e) 167 | { 168 | labelDialogResult.Text = "Dialog Box Result"; 169 | var result = RJMessageBox.Show("This is an example of a Message Box that sets Button3 as the Default Selected Button.\nThat is, pressing the Enter Key selects the Button3.", 170 | "Warning-Exclamation Icon", 171 | MessageBoxButtons.AbortRetryIgnore, 172 | MessageBoxIcon.Error, 173 | MessageBoxDefaultButton.Button3); 174 | labelDialogResult.Text = result.ToString()+" Selected"; 175 | } 176 | 177 | //Set Owner Object 178 | private void Any() 179 | { 180 | //-| IWin32Window owner: 181 | //Displays a message box in front of the specified object and with the other specified parameters. 182 | RJMessageBox.Show(this, "Text"); 183 | RJMessageBox.Show(this, "Text", "Caption"); 184 | RJMessageBox.Show(this, "Text", "Caption", MessageBoxButtons.OKCancel); 185 | //Etc 186 | } 187 | } 188 | } 189 | -------------------------------------------------------------------------------- /CustomMessageBox/FormMessageBox.Designer.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace CustomMessageBox.Private 3 | { 4 | partial class FormMessageBox 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Windows Form Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.panelTitleBar = new System.Windows.Forms.Panel(); 33 | this.labelCaption = new System.Windows.Forms.Label(); 34 | this.btnClose = new System.Windows.Forms.Button(); 35 | this.panelButtons = new System.Windows.Forms.Panel(); 36 | this.button3 = new System.Windows.Forms.Button(); 37 | this.button2 = new System.Windows.Forms.Button(); 38 | this.button1 = new System.Windows.Forms.Button(); 39 | this.panelBody = new System.Windows.Forms.Panel(); 40 | this.labelMessage = new System.Windows.Forms.Label(); 41 | this.pictureBoxIcon = new System.Windows.Forms.PictureBox(); 42 | this.panelTitleBar.SuspendLayout(); 43 | this.panelButtons.SuspendLayout(); 44 | this.panelBody.SuspendLayout(); 45 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxIcon)).BeginInit(); 46 | this.SuspendLayout(); 47 | // 48 | // panelTitleBar 49 | // 50 | this.panelTitleBar.BackColor = System.Drawing.Color.CornflowerBlue; 51 | this.panelTitleBar.Controls.Add(this.labelCaption); 52 | this.panelTitleBar.Controls.Add(this.btnClose); 53 | this.panelTitleBar.Dock = System.Windows.Forms.DockStyle.Top; 54 | this.panelTitleBar.Location = new System.Drawing.Point(2, 2); 55 | this.panelTitleBar.Name = "panelTitleBar"; 56 | this.panelTitleBar.Size = new System.Drawing.Size(346, 35); 57 | this.panelTitleBar.TabIndex = 0; 58 | this.panelTitleBar.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panelTitleBar_MouseDown); 59 | // 60 | // labelCaption 61 | // 62 | this.labelCaption.AutoSize = true; 63 | this.labelCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 64 | this.labelCaption.ForeColor = System.Drawing.Color.White; 65 | this.labelCaption.Location = new System.Drawing.Point(9, 8); 66 | this.labelCaption.Name = "labelCaption"; 67 | this.labelCaption.Size = new System.Drawing.Size(86, 17); 68 | this.labelCaption.TabIndex = 4; 69 | this.labelCaption.Text = "labelCaption"; 70 | // 71 | // btnClose 72 | // 73 | this.btnClose.Dock = System.Windows.Forms.DockStyle.Right; 74 | this.btnClose.FlatAppearance.BorderSize = 0; 75 | this.btnClose.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(79)))), ((int)(((byte)(95))))); 76 | this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 77 | this.btnClose.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 78 | this.btnClose.ForeColor = System.Drawing.Color.White; 79 | this.btnClose.Location = new System.Drawing.Point(306, 0); 80 | this.btnClose.Name = "btnClose"; 81 | this.btnClose.Size = new System.Drawing.Size(40, 35); 82 | this.btnClose.TabIndex = 3; 83 | this.btnClose.Text = "X"; 84 | this.btnClose.UseVisualStyleBackColor = false; 85 | this.btnClose.Click += new System.EventHandler(this.btnClose_Click); 86 | // 87 | // panelButtons 88 | // 89 | this.panelButtons.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); 90 | this.panelButtons.Controls.Add(this.button3); 91 | this.panelButtons.Controls.Add(this.button2); 92 | this.panelButtons.Controls.Add(this.button1); 93 | this.panelButtons.Dock = System.Windows.Forms.DockStyle.Bottom; 94 | this.panelButtons.Location = new System.Drawing.Point(2, 88); 95 | this.panelButtons.Name = "panelButtons"; 96 | this.panelButtons.Size = new System.Drawing.Size(346, 60); 97 | this.panelButtons.TabIndex = 1; 98 | // 99 | // button3 100 | // 101 | this.button3.BackColor = System.Drawing.Color.SeaGreen; 102 | this.button3.FlatAppearance.BorderSize = 0; 103 | this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 104 | this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 105 | this.button3.ForeColor = System.Drawing.Color.WhiteSmoke; 106 | this.button3.Location = new System.Drawing.Point(231, 12); 107 | this.button3.Name = "button3"; 108 | this.button3.Size = new System.Drawing.Size(100, 35); 109 | this.button3.TabIndex = 2; 110 | this.button3.Text = "button3"; 111 | this.button3.UseVisualStyleBackColor = false; 112 | // 113 | // button2 114 | // 115 | this.button2.BackColor = System.Drawing.Color.SeaGreen; 116 | this.button2.FlatAppearance.BorderSize = 0; 117 | this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 118 | this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 119 | this.button2.ForeColor = System.Drawing.Color.WhiteSmoke; 120 | this.button2.Location = new System.Drawing.Point(125, 12); 121 | this.button2.Name = "button2"; 122 | this.button2.Size = new System.Drawing.Size(100, 35); 123 | this.button2.TabIndex = 1; 124 | this.button2.Text = "button2"; 125 | this.button2.UseVisualStyleBackColor = false; 126 | // 127 | // button1 128 | // 129 | this.button1.BackColor = System.Drawing.Color.SeaGreen; 130 | this.button1.FlatAppearance.BorderSize = 0; 131 | this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 132 | this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 133 | this.button1.ForeColor = System.Drawing.Color.WhiteSmoke; 134 | this.button1.Location = new System.Drawing.Point(19, 12); 135 | this.button1.Name = "button1"; 136 | this.button1.Size = new System.Drawing.Size(100, 35); 137 | this.button1.TabIndex = 0; 138 | this.button1.Text = "button1"; 139 | this.button1.UseVisualStyleBackColor = false; 140 | // 141 | // panelBody 142 | // 143 | this.panelBody.BackColor = System.Drawing.Color.WhiteSmoke; 144 | this.panelBody.Controls.Add(this.labelMessage); 145 | this.panelBody.Controls.Add(this.pictureBoxIcon); 146 | this.panelBody.Dock = System.Windows.Forms.DockStyle.Fill; 147 | this.panelBody.Location = new System.Drawing.Point(2, 37); 148 | this.panelBody.Name = "panelBody"; 149 | this.panelBody.Padding = new System.Windows.Forms.Padding(10, 10, 0, 0); 150 | this.panelBody.Size = new System.Drawing.Size(346, 51); 151 | this.panelBody.TabIndex = 2; 152 | // 153 | // labelMessage 154 | // 155 | this.labelMessage.AutoSize = true; 156 | this.labelMessage.Dock = System.Windows.Forms.DockStyle.Fill; 157 | this.labelMessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 158 | this.labelMessage.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(85)))), ((int)(((byte)(85)))), ((int)(((byte)(85))))); 159 | this.labelMessage.Location = new System.Drawing.Point(50, 10); 160 | this.labelMessage.MaximumSize = new System.Drawing.Size(600, 0); 161 | this.labelMessage.Name = "labelMessage"; 162 | this.labelMessage.Padding = new System.Windows.Forms.Padding(5, 5, 10, 15); 163 | this.labelMessage.Size = new System.Drawing.Size(110, 37); 164 | this.labelMessage.TabIndex = 1; 165 | this.labelMessage.Text = "labelMessage"; 166 | this.labelMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 167 | // 168 | // pictureBoxIcon 169 | // 170 | this.pictureBoxIcon.Dock = System.Windows.Forms.DockStyle.Left; 171 | this.pictureBoxIcon.Image = global::CustomMessageBox.Properties.Resources.chat; 172 | this.pictureBoxIcon.Location = new System.Drawing.Point(10, 10); 173 | this.pictureBoxIcon.Name = "pictureBoxIcon"; 174 | this.pictureBoxIcon.Size = new System.Drawing.Size(40, 41); 175 | this.pictureBoxIcon.TabIndex = 0; 176 | this.pictureBoxIcon.TabStop = false; 177 | // 178 | // FormMessageBox 179 | // 180 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 181 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 182 | this.BackColor = System.Drawing.Color.CornflowerBlue; 183 | this.ClientSize = new System.Drawing.Size(350, 150); 184 | this.Controls.Add(this.panelBody); 185 | this.Controls.Add(this.panelButtons); 186 | this.Controls.Add(this.panelTitleBar); 187 | this.MinimumSize = new System.Drawing.Size(350, 150); 188 | this.Name = "FormMessageBox"; 189 | this.Padding = new System.Windows.Forms.Padding(2); 190 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 191 | this.Text = "Form1"; 192 | this.panelTitleBar.ResumeLayout(false); 193 | this.panelTitleBar.PerformLayout(); 194 | this.panelButtons.ResumeLayout(false); 195 | this.panelBody.ResumeLayout(false); 196 | this.panelBody.PerformLayout(); 197 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxIcon)).EndInit(); 198 | this.ResumeLayout(false); 199 | 200 | } 201 | 202 | #endregion 203 | 204 | private System.Windows.Forms.Panel panelTitleBar; 205 | private System.Windows.Forms.Panel panelButtons; 206 | private System.Windows.Forms.Button button3; 207 | private System.Windows.Forms.Button button2; 208 | private System.Windows.Forms.Button button1; 209 | private System.Windows.Forms.Button btnClose; 210 | private System.Windows.Forms.Panel panelBody; 211 | private System.Windows.Forms.Label labelMessage; 212 | private System.Windows.Forms.PictureBox pictureBoxIcon; 213 | private System.Windows.Forms.Label labelCaption; 214 | } 215 | } 216 | 217 | -------------------------------------------------------------------------------- /CustomMessageBox/FormMessageBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows.Forms; 11 | 12 | namespace CustomMessageBox.Private 13 | { 14 | public partial class FormMessageBox : Form 15 | { 16 | //Fields 17 | private Color primaryColor = Color.CornflowerBlue; 18 | private int borderSize = 2; 19 | 20 | //Properties 21 | public Color PrimaryColor 22 | { 23 | get { return primaryColor; } 24 | set 25 | { 26 | primaryColor = value; 27 | this.BackColor = primaryColor;//Form Border Color 28 | this.panelTitleBar.BackColor = PrimaryColor;//Title Bar Back Color 29 | } 30 | } 31 | 32 | //Constructors 33 | public FormMessageBox(string text) 34 | { 35 | InitializeComponent(); 36 | InitializeItems(); 37 | this.PrimaryColor = primaryColor; 38 | this.labelMessage.Text = text; 39 | this.labelCaption.Text = ""; 40 | SetFormSize(); 41 | SetButtons(MessageBoxButtons.OK, MessageBoxDefaultButton.Button1);//Set Default Buttons 42 | } 43 | public FormMessageBox(string text, string caption) 44 | { 45 | InitializeComponent(); 46 | InitializeItems(); 47 | this.PrimaryColor = primaryColor; 48 | this.labelMessage.Text = text; 49 | this.labelCaption.Text = caption; 50 | SetFormSize(); 51 | SetButtons(MessageBoxButtons.OK, MessageBoxDefaultButton.Button1);//Set Default Buttons 52 | } 53 | public FormMessageBox(string text, string caption, MessageBoxButtons buttons) 54 | { 55 | InitializeComponent(); 56 | InitializeItems(); 57 | this.PrimaryColor = primaryColor; 58 | this.labelMessage.Text = text; 59 | this.labelCaption.Text = caption; 60 | SetFormSize(); 61 | SetButtons(buttons, MessageBoxDefaultButton.Button1);//Set [Default Button 1] 62 | } 63 | public FormMessageBox(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon) 64 | { 65 | InitializeComponent(); 66 | InitializeItems(); 67 | this.PrimaryColor = primaryColor; 68 | this.labelMessage.Text = text; 69 | this.labelCaption.Text = caption; 70 | SetFormSize(); 71 | SetButtons(buttons, MessageBoxDefaultButton.Button1);//Set [Default Button 1] 72 | SetIcon(icon); 73 | } 74 | public FormMessageBox(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton) 75 | { 76 | InitializeComponent(); 77 | InitializeItems(); 78 | this.PrimaryColor = primaryColor; 79 | this.labelMessage.Text = text; 80 | this.labelCaption.Text = caption; 81 | SetFormSize(); 82 | SetButtons(buttons, defaultButton); 83 | SetIcon(icon); 84 | } 85 | 86 | //-> Private Methods 87 | private void InitializeItems() 88 | { 89 | this.FormBorderStyle = FormBorderStyle.None; 90 | this.Padding = new Padding(borderSize);//Set border size 91 | this.labelMessage.MaximumSize = new Size(550, 0); 92 | this.btnClose.DialogResult = DialogResult.Cancel; 93 | this.button1.DialogResult = DialogResult.OK; 94 | this.button1.Visible = false; 95 | this.button2.Visible = false; 96 | this.button3.Visible = false; 97 | } 98 | private void SetFormSize() 99 | { 100 | int widht = this.labelMessage.Width + this.pictureBoxIcon.Width + this.panelBody.Padding.Left; 101 | int height = this.panelTitleBar.Height + this.labelMessage.Height + this.panelButtons.Height + this.panelBody.Padding.Top; 102 | this.Size = new Size(widht, height); 103 | } 104 | private void SetButtons(MessageBoxButtons buttons, MessageBoxDefaultButton defaultButton) 105 | { 106 | int xCenter = (this.panelButtons.Width - button1.Width) / 2; 107 | int yCenter = (this.panelButtons.Height - button1.Height) / 2; 108 | 109 | switch (buttons) 110 | { 111 | case MessageBoxButtons.OK: 112 | //OK Button 113 | button1.Visible = true; 114 | button1.Location = new Point(xCenter, yCenter); 115 | button1.Text = "Ok"; 116 | button1.DialogResult = DialogResult.OK;//Set DialogResult 117 | 118 | //Set Default Button 119 | SetDefaultButton(defaultButton); 120 | break; 121 | case MessageBoxButtons.OKCancel: 122 | //OK Button 123 | button1.Visible = true; 124 | button1.Location = new Point(xCenter - (button1.Width / 2) - 5, yCenter); 125 | button1.Text = "Ok"; 126 | button1.DialogResult = DialogResult.OK;//Set DialogResult 127 | 128 | //Cancel Button 129 | button2.Visible = true; 130 | button2.Location = new Point(xCenter + (button2.Width / 2) + 5, yCenter); 131 | button2.Text = "Cancel"; 132 | button2.DialogResult = DialogResult.Cancel;//Set DialogResult 133 | button2.BackColor = Color.DimGray; 134 | 135 | //Set Default Button 136 | if (defaultButton != MessageBoxDefaultButton.Button3)//There are only 2 buttons, so the Default Button cannot be Button3 137 | SetDefaultButton(defaultButton); 138 | else SetDefaultButton(MessageBoxDefaultButton.Button1); 139 | break; 140 | 141 | case MessageBoxButtons.RetryCancel: 142 | //Retry Button 143 | button1.Visible = true; 144 | button1.Location = new Point(xCenter - (button1.Width / 2) - 5, yCenter); 145 | button1.Text = "Retry"; 146 | button1.DialogResult = DialogResult.Retry;//Set DialogResult 147 | 148 | //Cancel Button 149 | button2.Visible = true; 150 | button2.Location = new Point(xCenter + (button2.Width / 2) + 5, yCenter); 151 | button2.Text = "Cancel"; 152 | button2.DialogResult = DialogResult.Cancel;//Set DialogResult 153 | button2.BackColor = Color.DimGray; 154 | 155 | //Set Default Button 156 | if (defaultButton != MessageBoxDefaultButton.Button3)//There are only 2 buttons, so the Default Button cannot be Button3 157 | SetDefaultButton(defaultButton); 158 | else SetDefaultButton(MessageBoxDefaultButton.Button1); 159 | break; 160 | 161 | case MessageBoxButtons.YesNo: 162 | //Yes Button 163 | button1.Visible = true; 164 | button1.Location = new Point(xCenter - (button1.Width / 2) - 5, yCenter); 165 | button1.Text = "Yes"; 166 | button1.DialogResult = DialogResult.Yes;//Set DialogResult 167 | 168 | //No Button 169 | button2.Visible = true; 170 | button2.Location = new Point(xCenter + (button2.Width / 2) + 5, yCenter); 171 | button2.Text = "No"; 172 | button2.DialogResult = DialogResult.No;//Set DialogResult 173 | button2.BackColor = Color.IndianRed; 174 | 175 | //Set Default Button 176 | if (defaultButton != MessageBoxDefaultButton.Button3)//There are only 2 buttons, so the Default Button cannot be Button3 177 | SetDefaultButton(defaultButton); 178 | else SetDefaultButton(MessageBoxDefaultButton.Button1); 179 | break; 180 | case MessageBoxButtons.YesNoCancel: 181 | //Yes Button 182 | button1.Visible = true; 183 | button1.Location = new Point(xCenter - button1.Width - 5, yCenter); 184 | button1.Text = "Yes"; 185 | button1.DialogResult = DialogResult.Yes;//Set DialogResult 186 | 187 | //No Button 188 | button2.Visible = true; 189 | button2.Location = new Point(xCenter, yCenter); 190 | button2.Text = "No"; 191 | button2.DialogResult = DialogResult.No;//Set DialogResult 192 | button2.BackColor = Color.IndianRed; 193 | 194 | //Cancel Button 195 | button3.Visible = true; 196 | button3.Location = new Point(xCenter + button2.Width + 5, yCenter); 197 | button3.Text = "Cancel"; 198 | button3.DialogResult = DialogResult.Cancel;//Set DialogResult 199 | button3.BackColor = Color.DimGray; 200 | 201 | //Set Default Button 202 | SetDefaultButton(defaultButton); 203 | break; 204 | 205 | case MessageBoxButtons.AbortRetryIgnore: 206 | //Abort Button 207 | button1.Visible = true; 208 | button1.Location = new Point(xCenter - button1.Width - 5, yCenter); 209 | button1.Text = "Abort"; 210 | button1.DialogResult = DialogResult.Abort;//Set DialogResult 211 | button1.BackColor = Color.Goldenrod; 212 | 213 | //Retry Button 214 | button2.Visible = true; 215 | button2.Location = new Point(xCenter, yCenter); 216 | button2.Text = "Retry"; 217 | button2.DialogResult = DialogResult.Retry;//Set DialogResult 218 | 219 | //Ignore Button 220 | button3.Visible = true; 221 | button3.Location = new Point(xCenter + button2.Width + 5, yCenter); 222 | button3.Text = "Ignore"; 223 | button3.DialogResult = DialogResult.Ignore;//Set DialogResult 224 | button3.BackColor = Color.IndianRed; 225 | 226 | //Set Default Button 227 | SetDefaultButton(defaultButton); 228 | break; 229 | } 230 | } 231 | private void SetDefaultButton(MessageBoxDefaultButton defaultButton) 232 | { 233 | switch (defaultButton) 234 | { 235 | case MessageBoxDefaultButton.Button1://Focus button 1 236 | button1.Select(); 237 | button1.ForeColor = Color.White; 238 | button1.Font = new Font(button1.Font, FontStyle.Underline); 239 | break; 240 | case MessageBoxDefaultButton.Button2://Focus button 2 241 | button2.Select(); 242 | button2.ForeColor = Color.White; 243 | button2.Font = new Font(button2.Font, FontStyle.Underline); 244 | break; 245 | case MessageBoxDefaultButton.Button3://Focus button 3 246 | button3.Select(); 247 | button3.ForeColor = Color.White; 248 | button3.Font = new Font(button3.Font, FontStyle.Underline); 249 | break; 250 | } 251 | } 252 | private void SetIcon(MessageBoxIcon icon) 253 | { 254 | switch (icon) 255 | { 256 | case MessageBoxIcon.Error: //Error 257 | this.pictureBoxIcon.Image = Properties.Resources.error; 258 | PrimaryColor = Color.FromArgb(224, 79, 95); 259 | this.btnClose.FlatAppearance.MouseOverBackColor = Color.Crimson; 260 | break; 261 | case MessageBoxIcon.Information: //Information 262 | this.pictureBoxIcon.Image = Properties.Resources.information; 263 | PrimaryColor = Color.FromArgb(38, 191, 166); 264 | break; 265 | case MessageBoxIcon.Question://Question 266 | this.pictureBoxIcon.Image = Properties.Resources.question; 267 | PrimaryColor = Color.FromArgb(10, 119, 232); 268 | break; 269 | case MessageBoxIcon.Exclamation://Exclamation 270 | this.pictureBoxIcon.Image = Properties.Resources.exclamation; 271 | PrimaryColor = Color.FromArgb(255, 140, 0); 272 | break; 273 | case MessageBoxIcon.None: //None 274 | this.pictureBoxIcon.Image = Properties.Resources.chat; 275 | PrimaryColor = Color.CornflowerBlue; 276 | break; 277 | } 278 | } 279 | 280 | //-> Events Methods 281 | private void btnClose_Click(object sender, EventArgs e) 282 | { 283 | this.Close(); 284 | } 285 | 286 | #region -> Drag Form 287 | [DllImport("user32.DLL", EntryPoint = "SendMessage")] 288 | private extern static void SendMessage(System.IntPtr hWnd, int wMsg, int wParam, int lParam); 289 | [DllImport("user32.DLL", EntryPoint = "ReleaseCapture")] 290 | private extern static void ReleaseCapture(); 291 | private void panelTitleBar_MouseDown(object sender, MouseEventArgs e) 292 | { 293 | ReleaseCapture(); 294 | SendMessage(this.Handle, 0x112, 0xf012, 0); 295 | } 296 | #endregion 297 | } 298 | } 299 | -------------------------------------------------------------------------------- /CustomMessageBox/Test/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace CustomMessageBox 3 | { 4 | partial class Form1 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Windows Form Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); 33 | this.label5 = new System.Windows.Forms.Label(); 34 | this.label4 = new System.Windows.Forms.Label(); 35 | this.label3 = new System.Windows.Forms.Label(); 36 | this.label2 = new System.Windows.Forms.Label(); 37 | this.label1 = new System.Windows.Forms.Label(); 38 | this.btnMsgText = new System.Windows.Forms.Button(); 39 | this.btnMsgTextCaption1 = new System.Windows.Forms.Button(); 40 | this.btnMsgOk = new System.Windows.Forms.Button(); 41 | this.btnMsgQuestion = new System.Windows.Forms.Button(); 42 | this.btnMsgButton1 = new System.Windows.Forms.Button(); 43 | this.btnMsgButton2 = new System.Windows.Forms.Button(); 44 | this.btnMsgButton3 = new System.Windows.Forms.Button(); 45 | this.btnMsgWarning = new System.Windows.Forms.Button(); 46 | this.btnMsgError = new System.Windows.Forms.Button(); 47 | this.btnMsgInformation = new System.Windows.Forms.Button(); 48 | this.btnMsgOkCancel = new System.Windows.Forms.Button(); 49 | this.btnMsgYesNo = new System.Windows.Forms.Button(); 50 | this.btnMsgAbortRetryIgnore = new System.Windows.Forms.Button(); 51 | this.btnMsgYesNoCancel = new System.Windows.Forms.Button(); 52 | this.btnMsgTextCaption2 = new System.Windows.Forms.Button(); 53 | this.btnMsgRetryCancel = new System.Windows.Forms.Button(); 54 | this.labelDialogResult = new System.Windows.Forms.Label(); 55 | this.tableLayoutPanel1.SuspendLayout(); 56 | this.SuspendLayout(); 57 | // 58 | // tableLayoutPanel1 59 | // 60 | this.tableLayoutPanel1.AutoSize = true; 61 | this.tableLayoutPanel1.ColumnCount = 5; 62 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); 63 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); 64 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); 65 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); 66 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); 67 | this.tableLayoutPanel1.Controls.Add(this.label5, 4, 0); 68 | this.tableLayoutPanel1.Controls.Add(this.label4, 3, 0); 69 | this.tableLayoutPanel1.Controls.Add(this.label3, 2, 0); 70 | this.tableLayoutPanel1.Controls.Add(this.label2, 1, 0); 71 | this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); 72 | this.tableLayoutPanel1.Controls.Add(this.btnMsgText, 0, 1); 73 | this.tableLayoutPanel1.Controls.Add(this.btnMsgTextCaption1, 1, 1); 74 | this.tableLayoutPanel1.Controls.Add(this.btnMsgOk, 2, 1); 75 | this.tableLayoutPanel1.Controls.Add(this.btnMsgQuestion, 3, 1); 76 | this.tableLayoutPanel1.Controls.Add(this.btnMsgButton1, 4, 1); 77 | this.tableLayoutPanel1.Controls.Add(this.btnMsgButton2, 4, 2); 78 | this.tableLayoutPanel1.Controls.Add(this.btnMsgButton3, 4, 3); 79 | this.tableLayoutPanel1.Controls.Add(this.btnMsgWarning, 3, 2); 80 | this.tableLayoutPanel1.Controls.Add(this.btnMsgError, 3, 3); 81 | this.tableLayoutPanel1.Controls.Add(this.btnMsgInformation, 3, 4); 82 | this.tableLayoutPanel1.Controls.Add(this.btnMsgAbortRetryIgnore, 2, 3); 83 | this.tableLayoutPanel1.Controls.Add(this.btnMsgOkCancel, 2, 2); 84 | this.tableLayoutPanel1.Controls.Add(this.btnMsgYesNo, 2, 4); 85 | this.tableLayoutPanel1.Controls.Add(this.btnMsgYesNoCancel, 2, 5); 86 | this.tableLayoutPanel1.Controls.Add(this.btnMsgTextCaption2, 1, 2); 87 | this.tableLayoutPanel1.Controls.Add(this.btnMsgRetryCancel, 2, 6); 88 | this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top; 89 | this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); 90 | this.tableLayoutPanel1.Name = "tableLayoutPanel1"; 91 | this.tableLayoutPanel1.RowCount = 7; 92 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 70F)); 93 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 75F)); 94 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 75F)); 95 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 75F)); 96 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 75F)); 97 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 75F)); 98 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 75F)); 99 | this.tableLayoutPanel1.Size = new System.Drawing.Size(1284, 520); 100 | this.tableLayoutPanel1.TabIndex = 0; 101 | // 102 | // label5 103 | // 104 | this.label5.BackColor = System.Drawing.Color.SlateGray; 105 | this.label5.Dock = System.Windows.Forms.DockStyle.Fill; 106 | this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 107 | this.label5.ForeColor = System.Drawing.Color.White; 108 | this.label5.Location = new System.Drawing.Point(1024, 0); 109 | this.label5.Margin = new System.Windows.Forms.Padding(0); 110 | this.label5.Name = "label5"; 111 | this.label5.Size = new System.Drawing.Size(260, 70); 112 | this.label5.TabIndex = 4; 113 | this.label5.Text = "Text | Caption | Buttons | Icon | Default Button"; 114 | this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 115 | // 116 | // label4 117 | // 118 | this.label4.BackColor = System.Drawing.Color.MediumSeaGreen; 119 | this.label4.Dock = System.Windows.Forms.DockStyle.Fill; 120 | this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 121 | this.label4.ForeColor = System.Drawing.Color.White; 122 | this.label4.Location = new System.Drawing.Point(768, 0); 123 | this.label4.Margin = new System.Windows.Forms.Padding(0); 124 | this.label4.Name = "label4"; 125 | this.label4.Size = new System.Drawing.Size(256, 70); 126 | this.label4.TabIndex = 3; 127 | this.label4.Text = "Text | Caption | Buttons | Icon"; 128 | this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 129 | // 130 | // label3 131 | // 132 | this.label3.BackColor = System.Drawing.Color.DarkSlateBlue; 133 | this.label3.Dock = System.Windows.Forms.DockStyle.Fill; 134 | this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 135 | this.label3.ForeColor = System.Drawing.Color.White; 136 | this.label3.Location = new System.Drawing.Point(512, 0); 137 | this.label3.Margin = new System.Windows.Forms.Padding(0); 138 | this.label3.Name = "label3"; 139 | this.label3.Size = new System.Drawing.Size(256, 70); 140 | this.label3.TabIndex = 2; 141 | this.label3.Text = "Text | Caption | Buttons"; 142 | this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 143 | // 144 | // label2 145 | // 146 | this.label2.BackColor = System.Drawing.Color.PaleVioletRed; 147 | this.label2.Dock = System.Windows.Forms.DockStyle.Fill; 148 | this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 149 | this.label2.ForeColor = System.Drawing.Color.White; 150 | this.label2.Location = new System.Drawing.Point(256, 0); 151 | this.label2.Margin = new System.Windows.Forms.Padding(0); 152 | this.label2.Name = "label2"; 153 | this.label2.Size = new System.Drawing.Size(256, 70); 154 | this.label2.TabIndex = 1; 155 | this.label2.Text = "Text | Caption"; 156 | this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 157 | // 158 | // label1 159 | // 160 | this.label1.BackColor = System.Drawing.Color.MediumSlateBlue; 161 | this.label1.Dock = System.Windows.Forms.DockStyle.Fill; 162 | this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 163 | this.label1.ForeColor = System.Drawing.Color.White; 164 | this.label1.Location = new System.Drawing.Point(0, 0); 165 | this.label1.Margin = new System.Windows.Forms.Padding(0); 166 | this.label1.Name = "label1"; 167 | this.label1.Size = new System.Drawing.Size(256, 70); 168 | this.label1.TabIndex = 0; 169 | this.label1.Text = "Text"; 170 | this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 171 | // 172 | // btnMsgText 173 | // 174 | this.btnMsgText.BackColor = System.Drawing.Color.CornflowerBlue; 175 | this.btnMsgText.Dock = System.Windows.Forms.DockStyle.Fill; 176 | this.btnMsgText.FlatAppearance.BorderSize = 0; 177 | this.btnMsgText.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 178 | this.btnMsgText.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 179 | this.btnMsgText.ForeColor = System.Drawing.Color.White; 180 | this.btnMsgText.Location = new System.Drawing.Point(15, 85); 181 | this.btnMsgText.Margin = new System.Windows.Forms.Padding(15); 182 | this.btnMsgText.Name = "btnMsgText"; 183 | this.btnMsgText.Size = new System.Drawing.Size(226, 45); 184 | this.btnMsgText.TabIndex = 5; 185 | this.btnMsgText.Text = "Text Message Only"; 186 | this.btnMsgText.UseVisualStyleBackColor = false; 187 | this.btnMsgText.Click += new System.EventHandler(this.btnMsgText_Click); 188 | // 189 | // btnMsgTextCaption1 190 | // 191 | this.btnMsgTextCaption1.BackColor = System.Drawing.Color.Tomato; 192 | this.btnMsgTextCaption1.Dock = System.Windows.Forms.DockStyle.Fill; 193 | this.btnMsgTextCaption1.FlatAppearance.BorderSize = 0; 194 | this.btnMsgTextCaption1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 195 | this.btnMsgTextCaption1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 196 | this.btnMsgTextCaption1.ForeColor = System.Drawing.Color.White; 197 | this.btnMsgTextCaption1.Location = new System.Drawing.Point(271, 85); 198 | this.btnMsgTextCaption1.Margin = new System.Windows.Forms.Padding(15); 199 | this.btnMsgTextCaption1.Name = "btnMsgTextCaption1"; 200 | this.btnMsgTextCaption1.Size = new System.Drawing.Size(226, 45); 201 | this.btnMsgTextCaption1.TabIndex = 6; 202 | this.btnMsgTextCaption1.Text = "Example 1"; 203 | this.btnMsgTextCaption1.UseVisualStyleBackColor = false; 204 | this.btnMsgTextCaption1.Click += new System.EventHandler(this.btnMsgTextCaption1_Click); 205 | // 206 | // btnMsgOk 207 | // 208 | this.btnMsgOk.BackColor = System.Drawing.Color.SeaGreen; 209 | this.btnMsgOk.Dock = System.Windows.Forms.DockStyle.Fill; 210 | this.btnMsgOk.FlatAppearance.BorderSize = 0; 211 | this.btnMsgOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 212 | this.btnMsgOk.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 213 | this.btnMsgOk.ForeColor = System.Drawing.Color.White; 214 | this.btnMsgOk.Location = new System.Drawing.Point(527, 85); 215 | this.btnMsgOk.Margin = new System.Windows.Forms.Padding(15); 216 | this.btnMsgOk.Name = "btnMsgOk"; 217 | this.btnMsgOk.Size = new System.Drawing.Size(226, 45); 218 | this.btnMsgOk.TabIndex = 7; 219 | this.btnMsgOk.Text = "Ok Button"; 220 | this.btnMsgOk.UseVisualStyleBackColor = false; 221 | this.btnMsgOk.Click += new System.EventHandler(this.btnMsgOk_Click); 222 | // 223 | // btnMsgQuestion 224 | // 225 | this.btnMsgQuestion.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(10)))), ((int)(((byte)(119)))), ((int)(((byte)(232))))); 226 | this.btnMsgQuestion.Dock = System.Windows.Forms.DockStyle.Fill; 227 | this.btnMsgQuestion.FlatAppearance.BorderSize = 0; 228 | this.btnMsgQuestion.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 229 | this.btnMsgQuestion.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 230 | this.btnMsgQuestion.ForeColor = System.Drawing.Color.White; 231 | this.btnMsgQuestion.Location = new System.Drawing.Point(783, 85); 232 | this.btnMsgQuestion.Margin = new System.Windows.Forms.Padding(15); 233 | this.btnMsgQuestion.Name = "btnMsgQuestion"; 234 | this.btnMsgQuestion.Size = new System.Drawing.Size(226, 45); 235 | this.btnMsgQuestion.TabIndex = 8; 236 | this.btnMsgQuestion.Text = "Question Icon"; 237 | this.btnMsgQuestion.UseVisualStyleBackColor = false; 238 | this.btnMsgQuestion.Click += new System.EventHandler(this.btnMsgQuestion_Click); 239 | // 240 | // btnMsgButton1 241 | // 242 | this.btnMsgButton1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255))))); 243 | this.btnMsgButton1.Dock = System.Windows.Forms.DockStyle.Fill; 244 | this.btnMsgButton1.FlatAppearance.BorderSize = 0; 245 | this.btnMsgButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 246 | this.btnMsgButton1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 247 | this.btnMsgButton1.ForeColor = System.Drawing.Color.White; 248 | this.btnMsgButton1.Location = new System.Drawing.Point(1039, 85); 249 | this.btnMsgButton1.Margin = new System.Windows.Forms.Padding(15); 250 | this.btnMsgButton1.Name = "btnMsgButton1"; 251 | this.btnMsgButton1.Size = new System.Drawing.Size(230, 45); 252 | this.btnMsgButton1.TabIndex = 9; 253 | this.btnMsgButton1.Text = "Default Button 1"; 254 | this.btnMsgButton1.UseVisualStyleBackColor = false; 255 | this.btnMsgButton1.Click += new System.EventHandler(this.btnMsgButton1_Click); 256 | // 257 | // btnMsgButton2 258 | // 259 | this.btnMsgButton2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); 260 | this.btnMsgButton2.Dock = System.Windows.Forms.DockStyle.Fill; 261 | this.btnMsgButton2.FlatAppearance.BorderSize = 0; 262 | this.btnMsgButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 263 | this.btnMsgButton2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 264 | this.btnMsgButton2.ForeColor = System.Drawing.Color.White; 265 | this.btnMsgButton2.Location = new System.Drawing.Point(1039, 160); 266 | this.btnMsgButton2.Margin = new System.Windows.Forms.Padding(15); 267 | this.btnMsgButton2.Name = "btnMsgButton2"; 268 | this.btnMsgButton2.Size = new System.Drawing.Size(230, 45); 269 | this.btnMsgButton2.TabIndex = 10; 270 | this.btnMsgButton2.Text = "Default Button 2"; 271 | this.btnMsgButton2.UseVisualStyleBackColor = false; 272 | this.btnMsgButton2.Click += new System.EventHandler(this.btnMsgButton2_Click); 273 | // 274 | // btnMsgButton3 275 | // 276 | this.btnMsgButton3.BackColor = System.Drawing.Color.Gray; 277 | this.btnMsgButton3.Dock = System.Windows.Forms.DockStyle.Fill; 278 | this.btnMsgButton3.FlatAppearance.BorderSize = 0; 279 | this.btnMsgButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 280 | this.btnMsgButton3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 281 | this.btnMsgButton3.ForeColor = System.Drawing.Color.White; 282 | this.btnMsgButton3.Location = new System.Drawing.Point(1039, 235); 283 | this.btnMsgButton3.Margin = new System.Windows.Forms.Padding(15); 284 | this.btnMsgButton3.Name = "btnMsgButton3"; 285 | this.btnMsgButton3.Size = new System.Drawing.Size(230, 45); 286 | this.btnMsgButton3.TabIndex = 11; 287 | this.btnMsgButton3.Text = "Default Button 3"; 288 | this.btnMsgButton3.UseVisualStyleBackColor = false; 289 | this.btnMsgButton3.Click += new System.EventHandler(this.btnMsgButton3_Click); 290 | // 291 | // btnMsgWarning 292 | // 293 | this.btnMsgWarning.BackColor = System.Drawing.Color.DarkOrange; 294 | this.btnMsgWarning.Dock = System.Windows.Forms.DockStyle.Fill; 295 | this.btnMsgWarning.FlatAppearance.BorderSize = 0; 296 | this.btnMsgWarning.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 297 | this.btnMsgWarning.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 298 | this.btnMsgWarning.ForeColor = System.Drawing.Color.White; 299 | this.btnMsgWarning.Location = new System.Drawing.Point(783, 160); 300 | this.btnMsgWarning.Margin = new System.Windows.Forms.Padding(15); 301 | this.btnMsgWarning.Name = "btnMsgWarning"; 302 | this.btnMsgWarning.Size = new System.Drawing.Size(226, 45); 303 | this.btnMsgWarning.TabIndex = 12; 304 | this.btnMsgWarning.Text = "Exclamation - Warning"; 305 | this.btnMsgWarning.UseVisualStyleBackColor = false; 306 | this.btnMsgWarning.Click += new System.EventHandler(this.btnMsgWarning_Click); 307 | // 308 | // btnMsgError 309 | // 310 | this.btnMsgError.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(79)))), ((int)(((byte)(95))))); 311 | this.btnMsgError.Dock = System.Windows.Forms.DockStyle.Fill; 312 | this.btnMsgError.FlatAppearance.BorderSize = 0; 313 | this.btnMsgError.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 314 | this.btnMsgError.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 315 | this.btnMsgError.ForeColor = System.Drawing.Color.White; 316 | this.btnMsgError.Location = new System.Drawing.Point(783, 235); 317 | this.btnMsgError.Margin = new System.Windows.Forms.Padding(15); 318 | this.btnMsgError.Name = "btnMsgError"; 319 | this.btnMsgError.Size = new System.Drawing.Size(226, 45); 320 | this.btnMsgError.TabIndex = 13; 321 | this.btnMsgError.Text = "Error - Stop"; 322 | this.btnMsgError.UseVisualStyleBackColor = false; 323 | this.btnMsgError.Click += new System.EventHandler(this.btnMsgError_Click); 324 | // 325 | // btnMsgInformation 326 | // 327 | this.btnMsgInformation.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(191)))), ((int)(((byte)(166))))); 328 | this.btnMsgInformation.Dock = System.Windows.Forms.DockStyle.Fill; 329 | this.btnMsgInformation.FlatAppearance.BorderSize = 0; 330 | this.btnMsgInformation.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 331 | this.btnMsgInformation.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 332 | this.btnMsgInformation.ForeColor = System.Drawing.Color.White; 333 | this.btnMsgInformation.Location = new System.Drawing.Point(783, 310); 334 | this.btnMsgInformation.Margin = new System.Windows.Forms.Padding(15); 335 | this.btnMsgInformation.Name = "btnMsgInformation"; 336 | this.btnMsgInformation.Size = new System.Drawing.Size(226, 45); 337 | this.btnMsgInformation.TabIndex = 14; 338 | this.btnMsgInformation.Text = "Information"; 339 | this.btnMsgInformation.UseVisualStyleBackColor = false; 340 | this.btnMsgInformation.Click += new System.EventHandler(this.btnMsgInformation_Click); 341 | // 342 | // btnMsgOkCancel 343 | // 344 | this.btnMsgOkCancel.BackColor = System.Drawing.Color.DarkSeaGreen; 345 | this.btnMsgOkCancel.Dock = System.Windows.Forms.DockStyle.Fill; 346 | this.btnMsgOkCancel.FlatAppearance.BorderSize = 0; 347 | this.btnMsgOkCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 348 | this.btnMsgOkCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 349 | this.btnMsgOkCancel.ForeColor = System.Drawing.Color.White; 350 | this.btnMsgOkCancel.Location = new System.Drawing.Point(527, 160); 351 | this.btnMsgOkCancel.Margin = new System.Windows.Forms.Padding(15); 352 | this.btnMsgOkCancel.Name = "btnMsgOkCancel"; 353 | this.btnMsgOkCancel.Size = new System.Drawing.Size(226, 45); 354 | this.btnMsgOkCancel.TabIndex = 15; 355 | this.btnMsgOkCancel.Text = "Ok - Cancel"; 356 | this.btnMsgOkCancel.UseVisualStyleBackColor = false; 357 | this.btnMsgOkCancel.Click += new System.EventHandler(this.btnMsgOkCancel_Click); 358 | // 359 | // btnMsgYesNo 360 | // 361 | this.btnMsgYesNo.BackColor = System.Drawing.Color.MediumOrchid; 362 | this.btnMsgYesNo.Dock = System.Windows.Forms.DockStyle.Fill; 363 | this.btnMsgYesNo.FlatAppearance.BorderSize = 0; 364 | this.btnMsgYesNo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 365 | this.btnMsgYesNo.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 366 | this.btnMsgYesNo.ForeColor = System.Drawing.Color.White; 367 | this.btnMsgYesNo.Location = new System.Drawing.Point(527, 310); 368 | this.btnMsgYesNo.Margin = new System.Windows.Forms.Padding(15); 369 | this.btnMsgYesNo.Name = "btnMsgYesNo"; 370 | this.btnMsgYesNo.Size = new System.Drawing.Size(226, 45); 371 | this.btnMsgYesNo.TabIndex = 16; 372 | this.btnMsgYesNo.Text = "Yes - No"; 373 | this.btnMsgYesNo.UseVisualStyleBackColor = false; 374 | this.btnMsgYesNo.Click += new System.EventHandler(this.btnMsgYesNo_Click); 375 | // 376 | // btnMsgAbortRetryIgnore 377 | // 378 | this.btnMsgAbortRetryIgnore.BackColor = System.Drawing.Color.MediumVioletRed; 379 | this.btnMsgAbortRetryIgnore.Dock = System.Windows.Forms.DockStyle.Fill; 380 | this.btnMsgAbortRetryIgnore.FlatAppearance.BorderSize = 0; 381 | this.btnMsgAbortRetryIgnore.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 382 | this.btnMsgAbortRetryIgnore.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 383 | this.btnMsgAbortRetryIgnore.ForeColor = System.Drawing.Color.White; 384 | this.btnMsgAbortRetryIgnore.Location = new System.Drawing.Point(527, 235); 385 | this.btnMsgAbortRetryIgnore.Margin = new System.Windows.Forms.Padding(15); 386 | this.btnMsgAbortRetryIgnore.Name = "btnMsgAbortRetryIgnore"; 387 | this.btnMsgAbortRetryIgnore.Size = new System.Drawing.Size(226, 45); 388 | this.btnMsgAbortRetryIgnore.TabIndex = 17; 389 | this.btnMsgAbortRetryIgnore.Text = "Abort - Retry - Ignore"; 390 | this.btnMsgAbortRetryIgnore.UseVisualStyleBackColor = false; 391 | this.btnMsgAbortRetryIgnore.Click += new System.EventHandler(this.btnMsgAbortRetryIgnore_Click); 392 | // 393 | // btnMsgYesNoCancel 394 | // 395 | this.btnMsgYesNoCancel.BackColor = System.Drawing.Color.BlueViolet; 396 | this.btnMsgYesNoCancel.Dock = System.Windows.Forms.DockStyle.Fill; 397 | this.btnMsgYesNoCancel.FlatAppearance.BorderSize = 0; 398 | this.btnMsgYesNoCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 399 | this.btnMsgYesNoCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 400 | this.btnMsgYesNoCancel.ForeColor = System.Drawing.Color.White; 401 | this.btnMsgYesNoCancel.Location = new System.Drawing.Point(527, 385); 402 | this.btnMsgYesNoCancel.Margin = new System.Windows.Forms.Padding(15); 403 | this.btnMsgYesNoCancel.Name = "btnMsgYesNoCancel"; 404 | this.btnMsgYesNoCancel.Size = new System.Drawing.Size(226, 45); 405 | this.btnMsgYesNoCancel.TabIndex = 18; 406 | this.btnMsgYesNoCancel.Text = "Yes - No - Cancel"; 407 | this.btnMsgYesNoCancel.UseVisualStyleBackColor = false; 408 | this.btnMsgYesNoCancel.Click += new System.EventHandler(this.btnMsgYesNoCancel_Click); 409 | // 410 | // btnMsgTextCaption2 411 | // 412 | this.btnMsgTextCaption2.BackColor = System.Drawing.Color.SteelBlue; 413 | this.btnMsgTextCaption2.FlatAppearance.BorderSize = 0; 414 | this.btnMsgTextCaption2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 415 | this.btnMsgTextCaption2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 416 | this.btnMsgTextCaption2.ForeColor = System.Drawing.Color.White; 417 | this.btnMsgTextCaption2.Location = new System.Drawing.Point(271, 160); 418 | this.btnMsgTextCaption2.Margin = new System.Windows.Forms.Padding(15); 419 | this.btnMsgTextCaption2.Name = "btnMsgTextCaption2"; 420 | this.btnMsgTextCaption2.Size = new System.Drawing.Size(226, 45); 421 | this.btnMsgTextCaption2.TabIndex = 19; 422 | this.btnMsgTextCaption2.Text = "Example 2"; 423 | this.btnMsgTextCaption2.UseVisualStyleBackColor = false; 424 | this.btnMsgTextCaption2.Click += new System.EventHandler(this.btnMsgTextCaption2_Click); 425 | // 426 | // btnMsgRetryCancel 427 | // 428 | this.btnMsgRetryCancel.BackColor = System.Drawing.Color.SlateGray; 429 | this.btnMsgRetryCancel.Dock = System.Windows.Forms.DockStyle.Fill; 430 | this.btnMsgRetryCancel.FlatAppearance.BorderSize = 0; 431 | this.btnMsgRetryCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 432 | this.btnMsgRetryCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 433 | this.btnMsgRetryCancel.ForeColor = System.Drawing.Color.White; 434 | this.btnMsgRetryCancel.Location = new System.Drawing.Point(527, 460); 435 | this.btnMsgRetryCancel.Margin = new System.Windows.Forms.Padding(15); 436 | this.btnMsgRetryCancel.Name = "btnMsgRetryCancel"; 437 | this.btnMsgRetryCancel.Size = new System.Drawing.Size(226, 45); 438 | this.btnMsgRetryCancel.TabIndex = 20; 439 | this.btnMsgRetryCancel.Text = "Retry - Cancel"; 440 | this.btnMsgRetryCancel.UseVisualStyleBackColor = false; 441 | this.btnMsgRetryCancel.Click += new System.EventHandler(this.btnMsgRetryCancel_Click); 442 | // 443 | // labelDialogResult 444 | // 445 | this.labelDialogResult.BackColor = System.Drawing.Color.White; 446 | this.labelDialogResult.Dock = System.Windows.Forms.DockStyle.Bottom; 447 | this.labelDialogResult.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 448 | this.labelDialogResult.ForeColor = System.Drawing.Color.DimGray; 449 | this.labelDialogResult.Location = new System.Drawing.Point(0, 542); 450 | this.labelDialogResult.Name = "labelDialogResult"; 451 | this.labelDialogResult.Size = new System.Drawing.Size(1284, 60); 452 | this.labelDialogResult.TabIndex = 1; 453 | this.labelDialogResult.Text = "Dialog Result"; 454 | this.labelDialogResult.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 455 | // 456 | // Form1 457 | // 458 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 459 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 460 | this.ClientSize = new System.Drawing.Size(1284, 602); 461 | this.Controls.Add(this.labelDialogResult); 462 | this.Controls.Add(this.tableLayoutPanel1); 463 | this.Name = "Form1"; 464 | this.Text = "Custom Message Box"; 465 | this.tableLayoutPanel1.ResumeLayout(false); 466 | this.ResumeLayout(false); 467 | this.PerformLayout(); 468 | 469 | } 470 | 471 | #endregion 472 | 473 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; 474 | private System.Windows.Forms.Label label5; 475 | private System.Windows.Forms.Label label4; 476 | private System.Windows.Forms.Label label3; 477 | private System.Windows.Forms.Label label2; 478 | private System.Windows.Forms.Label label1; 479 | private System.Windows.Forms.Button btnMsgText; 480 | private System.Windows.Forms.Button btnMsgTextCaption1; 481 | private System.Windows.Forms.Button btnMsgOk; 482 | private System.Windows.Forms.Button btnMsgQuestion; 483 | private System.Windows.Forms.Button btnMsgButton1; 484 | private System.Windows.Forms.Button btnMsgButton2; 485 | private System.Windows.Forms.Button btnMsgButton3; 486 | private System.Windows.Forms.Button btnMsgWarning; 487 | private System.Windows.Forms.Button btnMsgError; 488 | private System.Windows.Forms.Button btnMsgInformation; 489 | private System.Windows.Forms.Button btnMsgAbortRetryIgnore; 490 | private System.Windows.Forms.Button btnMsgOkCancel; 491 | private System.Windows.Forms.Button btnMsgYesNo; 492 | private System.Windows.Forms.Button btnMsgYesNoCancel; 493 | private System.Windows.Forms.Button btnMsgTextCaption2; 494 | private System.Windows.Forms.Button btnMsgRetryCancel; 495 | private System.Windows.Forms.Label labelDialogResult; 496 | } 497 | } --------------------------------------------------------------------------------