commit 5e8f669cc768f8f63c98e0c069454e4c820f6fe9 Author: Hoeglinger Eugen Date: Thu May 19 16:36:54 2022 +0200 Initialized - AdvMessageBox dient zum Erzeugen einer eigenen MessageBox. Der MessageBox kann ein eigenes Icon übergeben werden. Die Anzahl der Buttons kann zwischen 1 und 4 geändert werden. Die Standard-Buttons lassen sich benutzerdefiniert beschriften diff --git a/.vs/AdvMessageBox/v17/.suo b/.vs/AdvMessageBox/v17/.suo new file mode 100644 index 0000000..2c7098b Binary files /dev/null and b/.vs/AdvMessageBox/v17/.suo differ diff --git a/AdvMessageBox.sln b/AdvMessageBox.sln new file mode 100644 index 0000000..fe35d6b --- /dev/null +++ b/AdvMessageBox.sln @@ -0,0 +1,30 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32421.90 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvMessageBox", "AdvMessageBox\AdvMessageBox.csproj", "{959B45CA-B413-4177-8523-340837A6CE10}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_AdvMessageBox", "Test_AdvMessageBox\Test_AdvMessageBox.csproj", "{3916AD4C-EBFE-4EB3-B9FA-1DAE51F2BF92}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {959B45CA-B413-4177-8523-340837A6CE10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {959B45CA-B413-4177-8523-340837A6CE10}.Debug|Any CPU.Build.0 = Debug|Any CPU + {959B45CA-B413-4177-8523-340837A6CE10}.Release|Any CPU.ActiveCfg = Release|Any CPU + {959B45CA-B413-4177-8523-340837A6CE10}.Release|Any CPU.Build.0 = Release|Any CPU + {3916AD4C-EBFE-4EB3-B9FA-1DAE51F2BF92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3916AD4C-EBFE-4EB3-B9FA-1DAE51F2BF92}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3916AD4C-EBFE-4EB3-B9FA-1DAE51F2BF92}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3916AD4C-EBFE-4EB3-B9FA-1DAE51F2BF92}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {07474286-329C-49D7-892B-F6B6FEC44E86} + EndGlobalSection +EndGlobal diff --git a/AdvMessageBox.suo b/AdvMessageBox.suo new file mode 100644 index 0000000..7f5c78e Binary files /dev/null and b/AdvMessageBox.suo differ diff --git a/AdvMessageBox/AdvMessageBox.cs b/AdvMessageBox/AdvMessageBox.cs new file mode 100644 index 0000000..baa2abc --- /dev/null +++ b/AdvMessageBox/AdvMessageBox.cs @@ -0,0 +1,447 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using System.Drawing; +using System.Reflection; +using System.Windows.Forms; +using System.Runtime.InteropServices; + +namespace MsdnMag +{ + // ***************************************************************** + // Buttons combination + public enum MyMessageBoxButtons + { + OK = 0, + OKCancel = 1, + AbortRetryIgnore = 2, + YesNoCancel = 3, + YesNo = 4, + RetryCancel = 5, + YesNoAllCancel = 6 // NEW + } + // ***************************************************************** + + public class MessageBox + { + #region Version and Copyright + // Version and Copyright + static readonly string dllName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttribute().Title); //Den Programmnamen auslesen + //static readonly string dllName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen + static readonly string dllVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); + static readonly object[] attributes = System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); + static readonly string copyright = GenerateCopyright(); + + private static string CurrentYear() + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + + private static string StartYear() + { + string startYear; + if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © ")) + { + startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", ""); + while (startYear.StartsWith(" ")) + { + startYear = startYear.Remove(0, 1); + } + startYear = startYear.Remove(startYear.IndexOf(" ")); + return startYear; + } + else + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + } + + private static string GenerateCopyright() + { + string startYear = StartYear(); + string currentYear = CurrentYear(); + + if (startYear == currentYear) + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + } + else + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace(startYear, String.Concat(startYear, "-", currentYear)); + } + } + #endregion + + #region DLL-Info + /// + /// Contains the name of the dll file. + /// + public static string DllName { private set; get; } + + /// + /// Contains the version of the dll file. + /// + public static string DllVersion { private set; get; } + + /// + /// Contains the copyright notice. + /// + public static string Copyright { private set; get; } + + /// + /// Contains the name-, version- and copyright-information of the dll file. + /// + public static string[] DllInfo { private set; get; } + + private static void SetDllInfo() + { + //Set name, version and copyright + DllName = dllName; + DllVersion = dllVersion; + Copyright = copyright; + } + #endregion + + // ***************************************************************** + // Properties + protected LocalCbtHook m_cbt; + protected IntPtr m_handle = IntPtr.Zero; + protected bool m_alreadySetup = false; + // ***************************************************************** + + /// + /// Provide name, version and copyright of the DLL + /// + static MessageBox() + { + SetDllInfo(); // Set name, version and copyright of the DLL + } + + // ***************************************************************** + public MessageBox() + { + SetDllInfo(); // Set name, version and copyright of the DLL + + m_cbt = new LocalCbtHook(); + m_cbt.WindowCreated += new LocalCbtHook.CbtEventHandler(WndCreated); + m_cbt.WindowDestroyed += new LocalCbtHook.CbtEventHandler(WndDestroyed); + m_cbt.WindowActivated += new LocalCbtHook.CbtEventHandler(WndActivated); + } + // ***************************************************************** + + // ***************************************************************** + // PROPERTY IconFile + private string m_iconFile = ""; + public string IconFile + { + get {return m_iconFile;} + set {m_iconFile=value; m_iconIndex=0;} + } + // ***************************************************************** + + // ***************************************************************** + // PROPERTY YesAllNoCancel + public bool YesAllNoCancel = false; + private const int IDALL = 9; // same as IDHELP in the Win32 API + private const int MB_HELP = 0x00004000; + // ***************************************************************** + + // ***************************************************************** + // PROPERTY IconIndex + private int m_iconIndex = 0; + public int IconIndex + { + get {return m_iconIndex;} + set {m_iconIndex=value;} + } + // ***************************************************************** + + // ***************************************************************** + // Show + public DialogResult Show(string text, string title, MessageBoxButtons buttons, MessageBoxIcon icon) + { + // If a custom icon is requested, ensure the window leaves room for + // the icon... Add a fake icon + if (IconFile.Length > 0 && icon == MessageBoxIcon.None) + icon = MessageBoxIcon.Information; + else + IconFile = ""; + + + // Apply the changes needed if 4 buttons are required + if (YesAllNoCancel) + { + m_cbt.Install(); + buttons = MessageBoxButtons.YesNoCancel; + // Must use MessageBox API because of the 4th button + int res = _MessageBox(GetActiveWindow(), text, title, + (int) (buttons + (int) icon + MB_HELP)); + m_cbt.Uninstall(); + return (DialogResult) res; + } + + // Go the default way + m_cbt.Install(); + DialogResult dr = System.Windows.Forms.MessageBox.Show(text, title, buttons, icon); + m_cbt.Uninstall(); + return dr; + } + public DialogResult Show(string text, string title, MessageBoxButtons buttons) + { + return Show(text, title, buttons, MessageBoxIcon.None); + } + public DialogResult Show(string text, string title) + { + return Show(text, title, MessageBoxButtons.OK, MessageBoxIcon.None); + } + public DialogResult Show(string text) + { + return Show(text, "", MessageBoxButtons.OK, MessageBoxIcon.None); + } + // ***************************************************************** + + // ***************************************************************** + // WndCreated event handler + private void WndCreated(object sender, CbtEventArgs e) + { + if (e.IsDialogWindow) + { + m_alreadySetup = false; + Console.WriteLine("MessageBox created"); + m_handle = e.Handle; + } + } + // ***************************************************************** + + // ***************************************************************** + // WndDestroyed event handler + private void WndDestroyed(object sender, CbtEventArgs e) + { + if (e.Handle == m_handle) + { + m_alreadySetup = false; + m_handle = IntPtr.Zero; + } + } + // ***************************************************************** + + // ***************************************************************** + // WndActivated event handler + private void WndActivated(object sender, CbtEventArgs e) + { + if (m_handle != e.Handle) + return; + + // Not the first time + if (m_alreadySetup) + { + Console.WriteLine("(Already configured. Not the first time it is activated!)"); + return; + } + else + m_alreadySetup = true; + + + // + // Modify the MessageBox window + // + Console.WriteLine("MessageBox activated"); + + + // Replace the icon (0x0014 is the ID of the icon window) + if (m_iconFile.Length >0) + { + IntPtr hwndIcon = GetDlgItem(m_handle, 0x0014); + IntPtr hIcon = ExtractIcon(IntPtr.Zero, m_iconFile, m_iconIndex); + SendMessage(hwndIcon, STM_SETICON, hIcon, IntPtr.Zero); + } + + // Get the static window with the text and the text + IntPtr hwndText = GetDlgItem(m_handle, 0xFFFF); + StringBuilder sb = new StringBuilder(); + sb.Capacity = 256; + GetWindowText(hwndText, sb, 256); + string text = sb.ToString(); + + // Get the window position + RECT rc = new RECT(); + GetWindowRect(hwndText, rc); + POINT pt = new POINT(); + pt.x = rc.left; + pt.y = rc.top; + ScreenToClient(m_handle, pt); + + // Create the alternate EDIT window + IntPtr m_edit = CreateWindowEx(0, "edit", "", ES_READONLY|ES_MULTILINE|WS_CHILD|WS_VISIBLE, + pt.x, pt.y, rc.right-rc.left, rc.bottom-rc.top, + m_handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); + + // Set font and text + IntPtr hFont = SendMessage(hwndText, WM_GETFONT, IntPtr.Zero, IntPtr.Zero); + SendMessage(m_edit, WM_SETFONT, hFont, new IntPtr(1)); + SetWindowText(m_edit, text); + + // Copy the displayed text to the clipboard + Clipboard.SetDataObject(text); + + // Finalizing... + DestroyWindow(hwndText); + + + + // Yes-All-No-Cancel setup + // Map the YES-NO-CANCEL-HELP sequence to YES-OK to All-NO-CANCEL + // The mapping has two steps: button text and button ID + // No need to change the Yes button + + // Map button text + SetWindowText(GetDlgItem(m_handle,(int) DialogResult.No), "OK to All"); + SetWindowText(GetDlgItem(m_handle,(int) DialogResult.Cancel), DialogResult.No.ToString()); + SetWindowText(GetDlgItem(m_handle,IDALL), DialogResult.Cancel.ToString()); + + // Map button IDs + SetWindowLong(GetDlgItem(m_handle,(int) DialogResult.No), GWL_ID, (int)DialogResult.OK); + SetWindowLong(GetDlgItem(m_handle,(int) DialogResult.Cancel), GWL_ID, (int) DialogResult.No); + SetWindowLong(GetDlgItem(m_handle,IDALL), GWL_ID, (int) DialogResult.Cancel); + } + // ***************************************************************** + + #region Win32 Imports + private const int ES_READONLY = 0x00000800; + private const int ES_MULTILINE = 0x00000004; + private const int WS_VISIBLE = 0x10000000; + private const int WS_CHILD = 0x40000000; + private const int WM_SETFONT = 0x00000030; + private const int WM_GETFONT = 0x00000031; + private const int STM_SETICON = 0x00000170; + + // ************************************************************************ + // Win32: GetClassName + [DllImport("user32.dll")] + protected static extern int GetClassName(IntPtr hwnd, + StringBuilder lpClassName, int nMaxCount); + // ************************************************************************ + + // ************************************************************************ + // Win32: GetDlgItem + [DllImport("user32.dll")] + protected static extern IntPtr GetDlgItem(IntPtr hwnd, int id); + // ************************************************************************ + + // ************************************************************************ + // Win32: GetWindowText + [DllImport("user32.dll")] + protected static extern int GetWindowText(IntPtr hwnd, + StringBuilder lpString, int nMaxCount); + // ************************************************************************ + + // ************************************************************************ + // Win32: SetWindowText + [DllImport("user32.dll")] + protected static extern bool SetWindowText(IntPtr hwnd, string text); + // ************************************************************************ + + // ************************************************************************ + // Win32: GetWindowRect + [DllImport("user32.dll")] + protected static extern int GetWindowRect(IntPtr hwnd, RECT rc); + // ************************************************************************ + + // ************************************************************************ + // Win32: ScreenToClient + [DllImport("user32.dll")] + protected static extern int ScreenToClient(IntPtr hwnd, POINT pt); + // ************************************************************************ + + // ************************************************************************ + // Win32: SetWindowLong + protected const int GWL_ID = -12; + [DllImport("user32.dll")] + protected static extern int SetWindowLong(IntPtr hwnd, + int index, int newValue); + // ************************************************************************ + + // ************************************************************************ + // Win32: ExtractIcon + [DllImport("shell32.dll")] + protected static extern IntPtr ExtractIcon( + IntPtr hInst, // instance handle + string lpszExeFileName, // file name + int nIconIndex // icon index + ); + // ************************************************************************ + + // ************************************************************************ + // Win32: DestroyWindow + [DllImport("user32.dll")] + protected static extern void DestroyWindow(IntPtr hwnd); + // ************************************************************************ + + // ************************************************************************ + // Win32: MessageBox + [DllImport("user32.dll", EntryPoint="MessageBox")] + protected static extern int _MessageBox(IntPtr hwnd, string text, string caption, + int options); + // ************************************************************************ + + // ************************************************************************ + // Win32: SendMessage + [DllImport("user32.dll")] + protected static extern IntPtr SendMessage(IntPtr hwnd, + int msg, IntPtr wParam, IntPtr lParam); + // ************************************************************************ + + // ************************************************************************ + // Win32: GetActiveWindow + [DllImport("user32.dll")] + protected static extern IntPtr GetActiveWindow(); + // ************************************************************************ + + // ************************************************************************ + // Win32: CreateWindowEx + [DllImport("user32.dll")] + protected static extern IntPtr CreateWindowEx( + int dwExStyle, // extended window style + string lpClassName, // registered class name + string lpWindowName, // window name + int dwStyle, // window style + int x, // horizontal position of window + int y, // vertical position of window + int nWidth, // window width + int nHeight, // window height + IntPtr hWndParent, // handle to parent or owner window + IntPtr hMenu, // menu handle or child identifier + IntPtr hInstance, // handle to application instance + IntPtr lpParam // window-creation data + ); + // ************************************************************************ + + // ************************************************************************ + // POINT + [StructLayout(LayoutKind.Sequential)] + public class POINT + { + public int x; + public int y; + } + // ************************************************************************ + + // ************************************************************************ + // RECT + [StructLayout(LayoutKind.Sequential)] + public class RECT + { + public int left; + public int top; + public int right; + public int bottom; + } + // ************************************************************************ + + #endregion + } +} + diff --git a/AdvMessageBox/AdvMessageBox.csproj b/AdvMessageBox/AdvMessageBox.csproj new file mode 100644 index 0000000..170fc39 --- /dev/null +++ b/AdvMessageBox/AdvMessageBox.csproj @@ -0,0 +1,101 @@ + + + + Local + 7.0.9466 + 1.0 + {959B45CA-B413-4177-8523-340837A6CE10} + Debug + AnyCPU + + + hemessbox + + JScript + Grid + IE50 + false + Library + + + + + + + 0.0 + v4.7.2 + + + + bin\Debug\ + false + 285212672 + false + + DEBUG;TRACE + + true + 4096 + false + false + false + false + 4 + full + prompt + MinimumRecommendedRules.ruleset + false + + + bin\Release\ + false + 285212672 + false + + TRACE + + false + 4096 + true + false + false + false + 4 + none + prompt + MinimumRecommendedRules.ruleset + false + + + + CbtHook + bin\Debug\CbtHook.dll + + + System + + + System.Drawing + + + System.Windows.Forms + + + WindowsHook + bin\Debug\WindowsHook.dll + + + + + Code + + + Code + + + + + + + + \ No newline at end of file diff --git a/AdvMessageBox/AdvMessageBox.user b/AdvMessageBox/AdvMessageBox.user new file mode 100644 index 0000000..eea27e7 --- /dev/null +++ b/AdvMessageBox/AdvMessageBox.user @@ -0,0 +1,48 @@ + + + + + + + + + + + + diff --git a/AdvMessageBox/Properties/AssemblyInfo.cs b/AdvMessageBox/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b71116f --- /dev/null +++ b/AdvMessageBox/Properties/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("AdvMessageBox")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("AdvMessageBox")] +[assembly: AssemblyCopyright("Copyright © 2022 by Eugen Höglinger")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/AdvMessageBox/bin/Debug/CbtHook.dll b/AdvMessageBox/bin/Debug/CbtHook.dll new file mode 100644 index 0000000..1e5a1c3 Binary files /dev/null and b/AdvMessageBox/bin/Debug/CbtHook.dll differ diff --git a/AdvMessageBox/bin/Debug/WindowsHook.dll b/AdvMessageBox/bin/Debug/WindowsHook.dll new file mode 100644 index 0000000..bbdd9a2 Binary files /dev/null and b/AdvMessageBox/bin/Debug/WindowsHook.dll differ diff --git a/AdvMessageBox/bin/Debug/hemessbox.dll b/AdvMessageBox/bin/Debug/hemessbox.dll new file mode 100644 index 0000000..f32cecc Binary files /dev/null and b/AdvMessageBox/bin/Debug/hemessbox.dll differ diff --git a/AdvMessageBox/bin/Debug/hemessbox.pdb b/AdvMessageBox/bin/Debug/hemessbox.pdb new file mode 100644 index 0000000..4b62081 Binary files /dev/null and b/AdvMessageBox/bin/Debug/hemessbox.pdb differ diff --git a/AdvMessageBox/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/AdvMessageBox/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..057ed7f --- /dev/null +++ b/AdvMessageBox/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/AdvMessageBox/obj/Debug/AdvMessageBox.csproj.AssemblyReference.cache b/AdvMessageBox/obj/Debug/AdvMessageBox.csproj.AssemblyReference.cache new file mode 100644 index 0000000..89ffe82 Binary files /dev/null and b/AdvMessageBox/obj/Debug/AdvMessageBox.csproj.AssemblyReference.cache differ diff --git a/AdvMessageBox/obj/Debug/AdvMessageBox.csproj.CoreCompileInputs.cache b/AdvMessageBox/obj/Debug/AdvMessageBox.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..cc6aa69 --- /dev/null +++ b/AdvMessageBox/obj/Debug/AdvMessageBox.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +ce30fe113cdaacdc7189391e114f85b7df907d34 diff --git a/AdvMessageBox/obj/Debug/AdvMessageBox.csproj.FileListAbsolute.txt b/AdvMessageBox/obj/Debug/AdvMessageBox.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..ae3c5c7 --- /dev/null +++ b/AdvMessageBox/obj/Debug/AdvMessageBox.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\AdvMessageBox\obj\Debug\AdvMessageBox.csproj.AssemblyReference.cache +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\AdvMessageBox\obj\Debug\AdvMessageBox.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\AdvMessageBox\obj\Debug\AdvMessageBox.csproj.CopyComplete +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\AdvMessageBox\bin\Debug\hemessbox.dll +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\AdvMessageBox\bin\Debug\hemessbox.pdb +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\AdvMessageBox\obj\Debug\hemessbox.dll +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\AdvMessageBox\obj\Debug\hemessbox.pdb diff --git a/AdvMessageBox/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/AdvMessageBox/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..9e2c843 Binary files /dev/null and b/AdvMessageBox/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/AdvMessageBox/obj/Debug/hemessbox.dll b/AdvMessageBox/obj/Debug/hemessbox.dll new file mode 100644 index 0000000..f32cecc Binary files /dev/null and b/AdvMessageBox/obj/Debug/hemessbox.dll differ diff --git a/AdvMessageBox/obj/Debug/hemessbox.pdb b/AdvMessageBox/obj/Debug/hemessbox.pdb new file mode 100644 index 0000000..4b62081 Binary files /dev/null and b/AdvMessageBox/obj/Debug/hemessbox.pdb differ diff --git a/Backup/AdvMessageBox.sln b/Backup/AdvMessageBox.sln new file mode 100644 index 0000000..a521ba9 --- /dev/null +++ b/Backup/AdvMessageBox.sln @@ -0,0 +1,27 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvMessageBox", "AdvMessageBox\AdvMessageBox.csproj", "{959B45CA-B413-4177-8523-340837A6CE10}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_AdvMessageBox", "Test_AdvMessageBox\Test_AdvMessageBox.csproj", "{A48DC289-14BB-47D2-BF34-DCC8598DCE23}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {959B45CA-B413-4177-8523-340837A6CE10}.Debug.ActiveCfg = Debug|.NET + {959B45CA-B413-4177-8523-340837A6CE10}.Debug.Build.0 = Debug|.NET + {959B45CA-B413-4177-8523-340837A6CE10}.Release.ActiveCfg = Release|.NET + {959B45CA-B413-4177-8523-340837A6CE10}.Release.Build.0 = Release|.NET + {A48DC289-14BB-47D2-BF34-DCC8598DCE23}.Debug.ActiveCfg = Debug|.NET + {A48DC289-14BB-47D2-BF34-DCC8598DCE23}.Debug.Build.0 = Debug|.NET + {A48DC289-14BB-47D2-BF34-DCC8598DCE23}.Release.ActiveCfg = Release|.NET + {A48DC289-14BB-47D2-BF34-DCC8598DCE23}.Release.Build.0 = Release|.NET + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/Backup/AdvMessageBox/AdvMessageBox.cs b/Backup/AdvMessageBox/AdvMessageBox.cs new file mode 100644 index 0000000..f666bae --- /dev/null +++ b/Backup/AdvMessageBox/AdvMessageBox.cs @@ -0,0 +1,354 @@ +using System; +using System.Text; +using System.Drawing; +using System.Windows.Forms; +using System.Runtime.InteropServices; + +namespace MsdnMag +{ + // ***************************************************************** + // Buttons combination + public enum MyMessageBoxButtons + { + OK = 0, + OKCancel = 1, + AbortRetryIgnore = 2, + YesNoCancel = 3, + YesNo = 4, + RetryCancel = 5, + YesNoAllCancel = 6 // NEW + } + // ***************************************************************** + + public class MessageBox + { + // ***************************************************************** + // Properties + protected LocalCbtHook m_cbt; + protected IntPtr m_handle = IntPtr.Zero; + protected bool m_alreadySetup = false; + // ***************************************************************** + + // ***************************************************************** + public MessageBox() + { + m_cbt = new LocalCbtHook(); + m_cbt.WindowCreated += new LocalCbtHook.CbtEventHandler(WndCreated); + m_cbt.WindowDestroyed += new LocalCbtHook.CbtEventHandler(WndDestroyed); + m_cbt.WindowActivated += new LocalCbtHook.CbtEventHandler(WndActivated); + } + // ***************************************************************** + + // ***************************************************************** + // PROPERTY IconFile + private string m_iconFile = ""; + public string IconFile + { + get {return m_iconFile;} + set {m_iconFile=value; m_iconIndex=0;} + } + // ***************************************************************** + + // ***************************************************************** + // PROPERTY YesAllNoCancel + public bool YesAllNoCancel = false; + private const int IDALL = 9; // same as IDHELP in the Win32 API + private const int MB_HELP = 0x00004000; + // ***************************************************************** + + // ***************************************************************** + // PROPERTY IconIndex + private int m_iconIndex = 0; + public int IconIndex + { + get {return m_iconIndex;} + set {m_iconIndex=value;} + } + // ***************************************************************** + + // ***************************************************************** + // Show + public DialogResult Show(string text, string title, MessageBoxButtons buttons, MessageBoxIcon icon) + { + // If a custom icon is requested, ensure the window leaves room for + // the icon... Add a fake icon + if (IconFile.Length > 0 && icon == MessageBoxIcon.None) + icon = MessageBoxIcon.Information; + else + IconFile = ""; + + + // Apply the changes needed if 4 buttons are required + if (YesAllNoCancel) + { + m_cbt.Install(); + buttons = MessageBoxButtons.YesNoCancel; + // Must use MessageBox API because of the 4th button + int res = _MessageBox(GetActiveWindow(), text, title, + (int) (buttons + (int) icon + MB_HELP)); + m_cbt.Uninstall(); + return (DialogResult) res; + } + + // Go the default way + m_cbt.Install(); + DialogResult dr = System.Windows.Forms.MessageBox.Show(text, title, buttons, icon); + m_cbt.Uninstall(); + return dr; + } + public DialogResult Show(string text, string title, MessageBoxButtons buttons) + { + return Show(text, title, buttons, MessageBoxIcon.None); + } + public DialogResult Show(string text, string title) + { + return Show(text, title, MessageBoxButtons.OK, MessageBoxIcon.None); + } + public DialogResult Show(string text) + { + return Show(text, "", MessageBoxButtons.OK, MessageBoxIcon.None); + } + // ***************************************************************** + + // ***************************************************************** + // WndCreated event handler + private void WndCreated(object sender, CbtEventArgs e) + { + if (e.IsDialogWindow) + { + m_alreadySetup = false; + Console.WriteLine("MessageBox created"); + m_handle = e.Handle; + } + } + // ***************************************************************** + + // ***************************************************************** + // WndDestroyed event handler + private void WndDestroyed(object sender, CbtEventArgs e) + { + if (e.Handle == m_handle) + { + m_alreadySetup = false; + m_handle = IntPtr.Zero; + } + } + // ***************************************************************** + + // ***************************************************************** + // WndActivated event handler + private void WndActivated(object sender, CbtEventArgs e) + { + if (m_handle != e.Handle) + return; + + // Not the first time + if (m_alreadySetup) + { + Console.WriteLine("(Already configured. Not the first time it is activated!)"); + return; + } + else + m_alreadySetup = true; + + + // + // Modify the MessageBox window + // + Console.WriteLine("MessageBox activated"); + + + // Replace the icon (0x0014 is the ID of the icon window) + if (m_iconFile.Length >0) + { + IntPtr hwndIcon = GetDlgItem(m_handle, 0x0014); + IntPtr hIcon = ExtractIcon(IntPtr.Zero, m_iconFile, m_iconIndex); + SendMessage(hwndIcon, STM_SETICON, hIcon, IntPtr.Zero); + } + + // Get the static window with the text and the text + IntPtr hwndText = GetDlgItem(m_handle, 0xFFFF); + StringBuilder sb = new StringBuilder(); + sb.Capacity = 256; + GetWindowText(hwndText, sb, 256); + string text = sb.ToString(); + + // Get the window position + RECT rc = new RECT(); + GetWindowRect(hwndText, rc); + POINT pt = new POINT(); + pt.x = rc.left; + pt.y = rc.top; + ScreenToClient(m_handle, pt); + + // Create the alternate EDIT window + IntPtr m_edit = CreateWindowEx(0, "edit", "", ES_READONLY|ES_MULTILINE|WS_CHILD|WS_VISIBLE, + pt.x, pt.y, rc.right-rc.left, rc.bottom-rc.top, + m_handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); + + // Set font and text + IntPtr hFont = SendMessage(hwndText, WM_GETFONT, IntPtr.Zero, IntPtr.Zero); + SendMessage(m_edit, WM_SETFONT, hFont, new IntPtr(1)); + SetWindowText(m_edit, text); + + // Copy the displayed text to the clipboard + Clipboard.SetDataObject(text); + + // Finalizing... + DestroyWindow(hwndText); + + + + // Yes-All-No-Cancel setup + // Map the YES-NO-CANCEL-HELP sequence to YES-OK-NO-CANCEL + // The mapping has two steps: button text and button ID + // No need to change the Yes button + + // Map button text + SetWindowText(GetDlgItem(m_handle,(int) DialogResult.No), "OK to All"); + SetWindowText(GetDlgItem(m_handle,(int) DialogResult.Cancel), DialogResult.No.ToString()); + SetWindowText(GetDlgItem(m_handle,IDALL), DialogResult.Cancel.ToString()); + + // Map button IDs + SetWindowLong(GetDlgItem(m_handle,(int) DialogResult.No), GWL_ID, (int)DialogResult.OK); + SetWindowLong(GetDlgItem(m_handle,(int) DialogResult.Cancel), GWL_ID, (int) DialogResult.No); + SetWindowLong(GetDlgItem(m_handle,IDALL), GWL_ID, (int) DialogResult.Cancel); + } + // ***************************************************************** + + #region Win32 Imports + private const int ES_READONLY = 0x00000800; + private const int ES_MULTILINE = 0x00000004; + private const int WS_VISIBLE = 0x10000000; + private const int WS_CHILD = 0x40000000; + private const int WM_SETFONT = 0x00000030; + private const int WM_GETFONT = 0x00000031; + private const int STM_SETICON = 0x00000170; + + // ************************************************************************ + // Win32: GetClassName + [DllImport("user32.dll")] + protected static extern int GetClassName(IntPtr hwnd, + StringBuilder lpClassName, int nMaxCount); + // ************************************************************************ + + // ************************************************************************ + // Win32: GetDlgItem + [DllImport("user32.dll")] + protected static extern IntPtr GetDlgItem(IntPtr hwnd, int id); + // ************************************************************************ + + // ************************************************************************ + // Win32: GetWindowText + [DllImport("user32.dll")] + protected static extern int GetWindowText(IntPtr hwnd, + StringBuilder lpString, int nMaxCount); + // ************************************************************************ + + // ************************************************************************ + // Win32: SetWindowText + [DllImport("user32.dll")] + protected static extern bool SetWindowText(IntPtr hwnd, string text); + // ************************************************************************ + + // ************************************************************************ + // Win32: GetWindowRect + [DllImport("user32.dll")] + protected static extern int GetWindowRect(IntPtr hwnd, RECT rc); + // ************************************************************************ + + // ************************************************************************ + // Win32: ScreenToClient + [DllImport("user32.dll")] + protected static extern int ScreenToClient(IntPtr hwnd, POINT pt); + // ************************************************************************ + + // ************************************************************************ + // Win32: SetWindowLong + protected const int GWL_ID = -12; + [DllImport("user32.dll")] + protected static extern int SetWindowLong(IntPtr hwnd, + int index, int newValue); + // ************************************************************************ + + // ************************************************************************ + // Win32: ExtractIcon + [DllImport("shell32.dll")] + protected static extern IntPtr ExtractIcon( + IntPtr hInst, // instance handle + string lpszExeFileName, // file name + int nIconIndex // icon index + ); + // ************************************************************************ + + // ************************************************************************ + // Win32: DestroyWindow + [DllImport("user32.dll")] + protected static extern void DestroyWindow(IntPtr hwnd); + // ************************************************************************ + + // ************************************************************************ + // Win32: MessageBox + [DllImport("user32.dll", EntryPoint="MessageBox")] + protected static extern int _MessageBox(IntPtr hwnd, string text, string caption, + int options); + // ************************************************************************ + + // ************************************************************************ + // Win32: SendMessage + [DllImport("user32.dll")] + protected static extern IntPtr SendMessage(IntPtr hwnd, + int msg, IntPtr wParam, IntPtr lParam); + // ************************************************************************ + + // ************************************************************************ + // Win32: GetActiveWindow + [DllImport("user32.dll")] + protected static extern IntPtr GetActiveWindow(); + // ************************************************************************ + + // ************************************************************************ + // Win32: CreateWindowEx + [DllImport("user32.dll")] + protected static extern IntPtr CreateWindowEx( + int dwExStyle, // extended window style + string lpClassName, // registered class name + string lpWindowName, // window name + int dwStyle, // window style + int x, // horizontal position of window + int y, // vertical position of window + int nWidth, // window width + int nHeight, // window height + IntPtr hWndParent, // handle to parent or owner window + IntPtr hMenu, // menu handle or child identifier + IntPtr hInstance, // handle to application instance + IntPtr lpParam // window-creation data + ); + // ************************************************************************ + + // ************************************************************************ + // POINT + [StructLayout(LayoutKind.Sequential)] + public class POINT + { + public int x; + public int y; + } + // ************************************************************************ + + // ************************************************************************ + // RECT + [StructLayout(LayoutKind.Sequential)] + public class RECT + { + public int left; + public int top; + public int right; + public int bottom; + } + // ************************************************************************ + + #endregion + } +} + diff --git a/Backup/AdvMessageBox/AdvMessageBox.csproj b/Backup/AdvMessageBox/AdvMessageBox.csproj new file mode 100644 index 0000000..f961a72 --- /dev/null +++ b/Backup/AdvMessageBox/AdvMessageBox.csproj @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Backup/AdvMessageBox/AssemblyInfo.cs b/Backup/AdvMessageBox/AssemblyInfo.cs new file mode 100644 index 0000000..177a4f0 --- /dev/null +++ b/Backup/AdvMessageBox/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/Backup/Test_AdvMessageBox/App.ico b/Backup/Test_AdvMessageBox/App.ico new file mode 100644 index 0000000..3a5525f Binary files /dev/null and b/Backup/Test_AdvMessageBox/App.ico differ diff --git a/Backup/Test_AdvMessageBox/AssemblyInfo.cs b/Backup/Test_AdvMessageBox/AssemblyInfo.cs new file mode 100644 index 0000000..177a4f0 --- /dev/null +++ b/Backup/Test_AdvMessageBox/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/Backup/Test_AdvMessageBox/Test_AdvMessageBox.cs b/Backup/Test_AdvMessageBox/Test_AdvMessageBox.cs new file mode 100644 index 0000000..20a0ec1 --- /dev/null +++ b/Backup/Test_AdvMessageBox/Test_AdvMessageBox.cs @@ -0,0 +1,99 @@ +using System; +using System.Drawing; +using System.Collections; +using System.Windows.Forms; +using MsdnMag; + + +namespace TestMsgBox +{ + public class Form1 : System.Windows.Forms.Form + { + private System.Windows.Forms.Button ButtonTest; + private System.Windows.Forms.Button btnYesAllNoCancel; + private MsdnMag.MessageBox msg; + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.ButtonTest = new System.Windows.Forms.Button(); + this.btnYesAllNoCancel = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // ButtonTest + // + this.ButtonTest.Location = new System.Drawing.Point(16, 16); + this.ButtonTest.Name = "ButtonTest"; + this.ButtonTest.Size = new System.Drawing.Size(312, 24); + this.ButtonTest.TabIndex = 0; + this.ButtonTest.Text = "Test MsdnMag.MessageBox"; + this.ButtonTest.Click += new System.EventHandler(this.ButtonTest_Click); + // + // btnYesAllNoCancel + // + this.btnYesAllNoCancel.Location = new System.Drawing.Point(16, 48); + this.btnYesAllNoCancel.Name = "btnYesAllNoCancel"; + this.btnYesAllNoCancel.Size = new System.Drawing.Size(312, 24); + this.btnYesAllNoCancel.TabIndex = 1; + this.btnYesAllNoCancel.Text = "Test Yes-All-No-Cancel"; + this.btnYesAllNoCancel.Click += new System.EventHandler(this.btnYesAllNoCancel_Click); + // + // Form1 + // + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.ClientSize = new System.Drawing.Size(344, 93); + this.Controls.AddRange(new System.Windows.Forms.Control[] { + this.btnYesAllNoCancel, + this.ButtonTest}); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.Name = "Form1"; + this.Text = "Testing MessageBox"; + this.ResumeLayout(false); + + } + #endregion + + + public Form1() + { + InitializeComponent(); + msg = new MsdnMag.MessageBox(); + } + + + [STAThread] + static void Main() + { + Application.Run(new Form1()); + } + + + + private void ButtonTest_Click(object sender, System.EventArgs e) + { + msg.IconFile = "shell32.dll"; + msg.IconIndex = 41; + msg.YesAllNoCancel = false; + + DialogResult dr = msg.Show("Hello, managed world!", "Cutting Edge", + MessageBoxButtons.OK); + + Console.WriteLine(dr.ToString()); + } + + private void btnYesAllNoCancel_Click(object sender, System.EventArgs e) + { + msg.IconFile = "shell32.dll"; + msg.IconIndex = 41; + msg.YesAllNoCancel = true; + + DialogResult dr = msg.Show("Hello, managed world!", "Cutting Edge"); + Console.WriteLine(dr.ToString()); + } + } +} diff --git a/Backup/Test_AdvMessageBox/Test_AdvMessageBox.csproj b/Backup/Test_AdvMessageBox/Test_AdvMessageBox.csproj new file mode 100644 index 0000000..4db0225 --- /dev/null +++ b/Backup/Test_AdvMessageBox/Test_AdvMessageBox.csproj @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Backup/Test_AdvMessageBox/Test_AdvMessageBox.csproj.user b/Backup/Test_AdvMessageBox/Test_AdvMessageBox.csproj.user new file mode 100644 index 0000000..a4a8fbc --- /dev/null +++ b/Backup/Test_AdvMessageBox/Test_AdvMessageBox.csproj.user @@ -0,0 +1,48 @@ + + + + + + + + + + + + diff --git a/Backup/Test_AdvMessageBox/Test_AdvMessageBox.resx b/Backup/Test_AdvMessageBox/Test_AdvMessageBox.resx new file mode 100644 index 0000000..e5b5a11 --- /dev/null +++ b/Backup/Test_AdvMessageBox/Test_AdvMessageBox.resx @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Form1 + + \ No newline at end of file diff --git a/CuttingEdge0211.exe b/CuttingEdge0211.exe new file mode 100644 index 0000000..30d7b08 Binary files /dev/null and b/CuttingEdge0211.exe differ diff --git a/Daten/Notwendige DLLs/CbtHook.dll b/Daten/Notwendige DLLs/CbtHook.dll new file mode 100644 index 0000000..1e5a1c3 Binary files /dev/null and b/Daten/Notwendige DLLs/CbtHook.dll differ diff --git a/Daten/Notwendige DLLs/CbtHook.pdb b/Daten/Notwendige DLLs/CbtHook.pdb new file mode 100644 index 0000000..ddf4e76 Binary files /dev/null and b/Daten/Notwendige DLLs/CbtHook.pdb differ diff --git a/Daten/Notwendige DLLs/WindowsHook.dll b/Daten/Notwendige DLLs/WindowsHook.dll new file mode 100644 index 0000000..bbdd9a2 Binary files /dev/null and b/Daten/Notwendige DLLs/WindowsHook.dll differ diff --git a/Daten/Notwendige DLLs/WindowsHook.pdb b/Daten/Notwendige DLLs/WindowsHook.pdb new file mode 100644 index 0000000..985c0e7 Binary files /dev/null and b/Daten/Notwendige DLLs/WindowsHook.pdb differ diff --git a/Test_AdvMessageBox/App.config b/Test_AdvMessageBox/App.config new file mode 100644 index 0000000..5ffd8f8 --- /dev/null +++ b/Test_AdvMessageBox/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/Test_AdvMessageBox/Form1.Designer.cs b/Test_AdvMessageBox/Form1.Designer.cs new file mode 100644 index 0000000..ae9dd02 --- /dev/null +++ b/Test_AdvMessageBox/Form1.Designer.cs @@ -0,0 +1,144 @@ +namespace Test_AdvMessageBox +{ + partial class Form1 + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Windows Form-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + this.buttonTest2 = new System.Windows.Forms.Button(); + this.groupBoxProgramInfo = new System.Windows.Forms.GroupBox(); + this.labelProgramInfo = new System.Windows.Forms.Label(); + this.groupBoxDLLInfo = new System.Windows.Forms.GroupBox(); + this.labelDLLInfo = new System.Windows.Forms.Label(); + this.buttonTest1 = new System.Windows.Forms.Button(); + this.labelResult = new System.Windows.Forms.Label(); + this.groupBoxProgramInfo.SuspendLayout(); + this.groupBoxDLLInfo.SuspendLayout(); + this.SuspendLayout(); + // + // buttonTest2 + // + this.buttonTest2.Location = new System.Drawing.Point(12, 287); + this.buttonTest2.Name = "buttonTest2"; + this.buttonTest2.Size = new System.Drawing.Size(776, 23); + this.buttonTest2.TabIndex = 1; + this.buttonTest2.Text = "MessageBox with custommer icon and Yes-All-No-Cancel Buttons"; + this.buttonTest2.UseVisualStyleBackColor = true; + this.buttonTest2.Click += new System.EventHandler(this.buttonTest2_Click); + // + // groupBoxProgramInfo + // + this.groupBoxProgramInfo.Controls.Add(this.labelProgramInfo); + this.groupBoxProgramInfo.Location = new System.Drawing.Point(12, 372); + this.groupBoxProgramInfo.Name = "groupBoxProgramInfo"; + this.groupBoxProgramInfo.Size = new System.Drawing.Size(385, 66); + this.groupBoxProgramInfo.TabIndex = 11; + this.groupBoxProgramInfo.TabStop = false; + this.groupBoxProgramInfo.Text = "Programm Information"; + // + // labelProgramInfo + // + this.labelProgramInfo.AutoSize = true; + this.labelProgramInfo.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.labelProgramInfo.Location = new System.Drawing.Point(7, 20); + this.labelProgramInfo.Name = "labelProgramInfo"; + this.labelProgramInfo.Size = new System.Drawing.Size(16, 13); + this.labelProgramInfo.TabIndex = 0; + this.labelProgramInfo.Text = "..."; + // + // groupBoxDLLInfo + // + this.groupBoxDLLInfo.Controls.Add(this.labelDLLInfo); + this.groupBoxDLLInfo.Location = new System.Drawing.Point(403, 372); + this.groupBoxDLLInfo.Name = "groupBoxDLLInfo"; + this.groupBoxDLLInfo.Size = new System.Drawing.Size(385, 66); + this.groupBoxDLLInfo.TabIndex = 12; + this.groupBoxDLLInfo.TabStop = false; + this.groupBoxDLLInfo.Text = "DLL Information"; + // + // labelDLLInfo + // + this.labelDLLInfo.AutoSize = true; + this.labelDLLInfo.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.labelDLLInfo.Location = new System.Drawing.Point(7, 20); + this.labelDLLInfo.Name = "labelDLLInfo"; + this.labelDLLInfo.Size = new System.Drawing.Size(16, 13); + this.labelDLLInfo.TabIndex = 0; + this.labelDLLInfo.Text = "..."; + // + // buttonTest1 + // + this.buttonTest1.Location = new System.Drawing.Point(12, 258); + this.buttonTest1.Name = "buttonTest1"; + this.buttonTest1.Size = new System.Drawing.Size(776, 23); + this.buttonTest1.TabIndex = 0; + this.buttonTest1.Text = "MessageBox with customer icon"; + this.buttonTest1.UseVisualStyleBackColor = true; + this.buttonTest1.Click += new System.EventHandler(this.buttonTest1_Click); + // + // labelResult + // + this.labelResult.AutoSize = true; + this.labelResult.Location = new System.Drawing.Point(12, 13); + this.labelResult.Name = "labelResult"; + this.labelResult.Size = new System.Drawing.Size(16, 13); + this.labelResult.TabIndex = 14; + this.labelResult.Text = "..."; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.labelResult); + this.Controls.Add(this.buttonTest1); + this.Controls.Add(this.groupBoxProgramInfo); + this.Controls.Add(this.groupBoxDLLInfo); + this.Controls.Add(this.buttonTest2); + this.Name = "Form1"; + this.Text = "Test_InfoBox"; + this.Load += new System.EventHandler(this.Form1_Load); + this.groupBoxProgramInfo.ResumeLayout(false); + this.groupBoxProgramInfo.PerformLayout(); + this.groupBoxDLLInfo.ResumeLayout(false); + this.groupBoxDLLInfo.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button buttonTest2; + private System.Windows.Forms.GroupBox groupBoxProgramInfo; + private System.Windows.Forms.Label labelProgramInfo; + private System.Windows.Forms.GroupBox groupBoxDLLInfo; + private System.Windows.Forms.Label labelDLLInfo; + private System.Windows.Forms.Button buttonTest1; + private System.Windows.Forms.Label labelResult; + } +} + diff --git a/Test_AdvMessageBox/Form1.cs b/Test_AdvMessageBox/Form1.cs new file mode 100644 index 0000000..13bebf7 --- /dev/null +++ b/Test_AdvMessageBox/Form1.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using MsdnMag; + +namespace Test_AdvMessageBox +{ + public partial class Form1 : Form + { + #region Version und Copyright + // Version und Copyright + string programName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen + string programVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); + static object[] attributes = System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); + string copyright = GenerateCopyright(); + string icon = Application.StartupPath + "\\Info.bmp"; + //Assembly Datum und Zeit + static DateTime value = AssemblyDateTime(); + string date = value.ToShortDateString(); + string time = value.ToLongTimeString(); + private static DateTime AssemblyDateTime() + { + var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision)); + //Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original) + return buildDateTime; + } + + private static string CurrentYear() + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + + private static string StartYear() + { + //string startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + //return startYear.Remove(0, startYear.LastIndexOf(" ") + 1); + string startYear = ""; + if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © ")) + { + startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", ""); + while (startYear.StartsWith(" ")) + { + startYear = startYear.Remove(0, 1); + } + startYear = startYear.Remove(startYear.IndexOf(" ")); + return startYear; + } + else + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + } + + private static string GenerateCopyright() + { + string startYear = StartYear(); + string currentYear = CurrentYear(); + + if (startYear == currentYear) + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + } + else + { + //return String.Concat(((AssemblyCopyrightAttribute)attributes[0]).Copyright, "-", currentYear); + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace(startYear, String.Concat(startYear, "-", currentYear)); + } + } + #endregion + + #region Programm-Info + /// + /// Contains the name of the program file + /// + public static string ProgramName { set; get; } + + /// + /// Contains the version of the program file + /// + public static string ProgramVersion { set; get; } + + /// + /// Contains the copyright notice + /// + public static string Copyright { set; get; } + + private void SetProgramInfo() + { + //Name, Version und Copyright setzen + ProgramName = programName; + ProgramVersion = programVersion; + Copyright = copyright; + } + #endregion + + public Form1() + { + SetProgramInfo(); + InitializeComponent(); + } + + private void Form1_Load(object sender, EventArgs e) + { + ShowInformation(); //Programm- und DLL-Information anzeigen + } + + private void ShowInformation() + { + labelProgramInfo.Text = String.Concat(ProgramName, "\n", ProgramVersion, "\n", Copyright); //Programm-Information anzeigen + + // DLL-Information anzeigen + labelDLLInfo.Text = String.Concat(MsdnMag.MessageBox.DllName, "\n", MsdnMag.MessageBox.DllVersion, "\n", MsdnMag.MessageBox.Copyright); + } + + MsdnMag.MessageBox msg = new MsdnMag.MessageBox(); + + private void buttonTest1_Click(object sender, EventArgs e) + { + // + // Diese Zeilen gehört in das Programm kopiert + // + msg.IconFile = "shell32.dll"; + msg.IconIndex = 41; + msg.YesAllNoCancel = false; + + DialogResult dr = msg.Show("Hello, managed world!", "Cutting Edge", MessageBoxButtons.OK); + + labelResult.Text = dr.ToString(); + // + // + } + + private void buttonTest2_Click(object sender, EventArgs e) + { + // + // Diese Zeilen gehört in das Programm kopiert + // + msg.IconFile = "shell32.dll"; + msg.IconIndex = 41; + msg.YesAllNoCancel = true; + + DialogResult dr = msg.Show("Hello, managed world!", "Cutting Edge"); + labelResult.Text = dr.ToString(); + // + // + } + } +} diff --git a/Test_AdvMessageBox/Form1.resx b/Test_AdvMessageBox/Form1.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Test_AdvMessageBox/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Test_AdvMessageBox/Program.cs b/Test_AdvMessageBox/Program.cs new file mode 100644 index 0000000..3210e51 --- /dev/null +++ b/Test_AdvMessageBox/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Test_AdvMessageBox +{ + internal static class Program + { + /// + /// Der Haupteinstiegspunkt für die Anwendung. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Test_AdvMessageBox/Properties/AssemblyInfo.cs b/Test_AdvMessageBox/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e78e04d --- /dev/null +++ b/Test_AdvMessageBox/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("Test_AdvMessageBox")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Test_AdvMessageBox")] +[assembly: AssemblyCopyright("Copyright © 2022 by Eugen Höglinger")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("3916ad4c-ebfe-4eb3-b9fa-1dae51f2bf92")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// übernehmen, indem Sie "*" eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.*")] +//[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Test_AdvMessageBox/Properties/Resources.Designer.cs b/Test_AdvMessageBox/Properties/Resources.Designer.cs new file mode 100644 index 0000000..564b134 --- /dev/null +++ b/Test_AdvMessageBox/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +using System; + +namespace Test_AdvMessageBox.Properties +{ + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if (object.ReferenceEquals(resourceMan, null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test_AdvMessageBox.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Test_AdvMessageBox/Properties/Resources.resx b/Test_AdvMessageBox/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Test_AdvMessageBox/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Test_AdvMessageBox/Properties/Settings.Designer.cs b/Test_AdvMessageBox/Properties/Settings.Designer.cs new file mode 100644 index 0000000..551fe20 --- /dev/null +++ b/Test_AdvMessageBox/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace Test_AdvMessageBox.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Test_AdvMessageBox/Properties/Settings.settings b/Test_AdvMessageBox/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Test_AdvMessageBox/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Test_AdvMessageBox/Test_AdvMessageBox.csproj b/Test_AdvMessageBox/Test_AdvMessageBox.csproj new file mode 100644 index 0000000..081e81e --- /dev/null +++ b/Test_AdvMessageBox/Test_AdvMessageBox.csproj @@ -0,0 +1,87 @@ + + + + + Debug + AnyCPU + {3916AD4C-EBFE-4EB3-B9FA-1DAE51F2BF92} + WinExe + Test_AdvMessageBox + Test_AdvMessageBox + v4.8 + 512 + true + false + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\AdvMessageBox\bin\Debug\hemessbox.dll + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/Test_AdvMessageBox/bin/Debug/CbtHook.dll b/Test_AdvMessageBox/bin/Debug/CbtHook.dll new file mode 100644 index 0000000..1e5a1c3 Binary files /dev/null and b/Test_AdvMessageBox/bin/Debug/CbtHook.dll differ diff --git a/Test_AdvMessageBox/bin/Debug/Test_AdvMessageBox.exe b/Test_AdvMessageBox/bin/Debug/Test_AdvMessageBox.exe new file mode 100644 index 0000000..bcd9251 Binary files /dev/null and b/Test_AdvMessageBox/bin/Debug/Test_AdvMessageBox.exe differ diff --git a/Test_AdvMessageBox/bin/Debug/Test_AdvMessageBox.exe.config b/Test_AdvMessageBox/bin/Debug/Test_AdvMessageBox.exe.config new file mode 100644 index 0000000..5ffd8f8 --- /dev/null +++ b/Test_AdvMessageBox/bin/Debug/Test_AdvMessageBox.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/Test_AdvMessageBox/bin/Debug/Test_AdvMessageBox.pdb b/Test_AdvMessageBox/bin/Debug/Test_AdvMessageBox.pdb new file mode 100644 index 0000000..8415083 Binary files /dev/null and b/Test_AdvMessageBox/bin/Debug/Test_AdvMessageBox.pdb differ diff --git a/Test_AdvMessageBox/bin/Debug/WindowsHook.dll b/Test_AdvMessageBox/bin/Debug/WindowsHook.dll new file mode 100644 index 0000000..bbdd9a2 Binary files /dev/null and b/Test_AdvMessageBox/bin/Debug/WindowsHook.dll differ diff --git a/Test_AdvMessageBox/bin/Debug/hemessbox.dll b/Test_AdvMessageBox/bin/Debug/hemessbox.dll new file mode 100644 index 0000000..f32cecc Binary files /dev/null and b/Test_AdvMessageBox/bin/Debug/hemessbox.dll differ diff --git a/Test_AdvMessageBox/bin/Debug/hemessbox.pdb b/Test_AdvMessageBox/bin/Debug/hemessbox.pdb new file mode 100644 index 0000000..4b62081 Binary files /dev/null and b/Test_AdvMessageBox/bin/Debug/hemessbox.pdb differ diff --git a/Test_AdvMessageBox/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/Test_AdvMessageBox/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..3cf0af3 --- /dev/null +++ b/Test_AdvMessageBox/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/Test_AdvMessageBox/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Test_AdvMessageBox/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..2a64df3 Binary files /dev/null and b/Test_AdvMessageBox/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Test_AdvMessageBox/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Test_AdvMessageBox/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..7520a4e Binary files /dev/null and b/Test_AdvMessageBox/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.Form1.resources b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.Form1.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.Form1.resources differ diff --git a/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.Properties.Resources.resources b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.Properties.Resources.resources differ diff --git a/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.AssemblyReference.cache b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.AssemblyReference.cache new file mode 100644 index 0000000..ff03d64 Binary files /dev/null and b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.AssemblyReference.cache differ diff --git a/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.CopyComplete b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.CoreCompileInputs.cache b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..4b60729 --- /dev/null +++ b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +9210c5222624b1f42d96fc58b7bec9daf4c0ab13 diff --git a/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.FileListAbsolute.txt b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..c6f7f2a --- /dev/null +++ b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.FileListAbsolute.txt @@ -0,0 +1,16 @@ +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\bin\Debug\Test_AdvMessageBox.exe.config +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\bin\Debug\Test_AdvMessageBox.exe +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\bin\Debug\Test_AdvMessageBox.pdb +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\bin\Debug\hemessbox.dll +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\bin\Debug\CbtHook.dll +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\bin\Debug\WindowsHook.dll +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\bin\Debug\hemessbox.pdb +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\obj\Debug\Test_AdvMessageBox.csproj.AssemblyReference.cache +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\obj\Debug\Test_AdvMessageBox.csproj.SuggestedBindingRedirects.cache +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\obj\Debug\Test_AdvMessageBox.Form1.resources +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\obj\Debug\Test_AdvMessageBox.Properties.Resources.resources +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\obj\Debug\Test_AdvMessageBox.csproj.GenerateResource.cache +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\obj\Debug\Test_AdvMessageBox.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\obj\Debug\Test_AdvMessageBox.csproj.CopyComplete +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\obj\Debug\Test_AdvMessageBox.exe +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\AdvMessageBox.git\Test_AdvMessageBox\obj\Debug\Test_AdvMessageBox.pdb diff --git a/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.GenerateResource.cache b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.GenerateResource.cache new file mode 100644 index 0000000..33b8e39 Binary files /dev/null and b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.GenerateResource.cache differ diff --git a/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.SuggestedBindingRedirects.cache b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.csproj.SuggestedBindingRedirects.cache new file mode 100644 index 0000000..e69de29 diff --git a/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.exe b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.exe new file mode 100644 index 0000000..bcd9251 Binary files /dev/null and b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.exe differ diff --git a/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.pdb b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.pdb new file mode 100644 index 0000000..8415083 Binary files /dev/null and b/Test_AdvMessageBox/obj/Debug/Test_AdvMessageBox.pdb differ diff --git a/UpgradeLog.htm b/UpgradeLog.htm new file mode 100644 index 0000000..91284d8 Binary files /dev/null and b/UpgradeLog.htm differ