diff --git a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj index f3b74032ba..026c5f729f 100755 --- a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj +++ b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj @@ -380,7 +380,6 @@ - diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/ToolStripEx.cs b/src/BizHawk.Client.EmuHawk/CustomControls/ToolStripEx.cs deleted file mode 100644 index 1149c41b73..0000000000 --- a/src/BizHawk.Client.EmuHawk/CustomControls/ToolStripEx.cs +++ /dev/null @@ -1,83 +0,0 @@ -//credit: http://blogs.msdn.com/b/rickbrew/archive/2006/01/09/511003.aspx - -using System; -using System.Windows.Forms; - -/// -/// This class adds on to the functionality provided in System.Windows.Forms.ToolStrip. -/// -public class ToolStripEx : ToolStrip -{ - /// - /// Gets or sets whether the ToolStripEx honors item clicks when its containing form does - /// not have input focus. - /// - public bool ClickThrough { get; set; } = true; - - protected override void WndProc(ref Message m) - { - base.WndProc(ref m); - if (ClickThrough - && m.Msg == NativeConstants.WM_MOUSEACTIVATE - && m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT) - { - m.Result = (IntPtr)NativeConstants.MA_ACTIVATE; - } - } -} - -/// -/// This class adds on to the functionality provided in System.Windows.Forms.MenuStrip. -/// -public class MenuStripEx : MenuStrip -{ - /// - /// Gets or sets whether the ToolStripEx honors item clicks when its containing form does - /// not have input focus. - /// - public bool ClickThrough { get; set; } = true; - - protected override void WndProc(ref Message m) - { - base.WndProc(ref m); - if (ClickThrough - && m.Msg == NativeConstants.WM_MOUSEACTIVATE - && m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT) - { - m.Result = (IntPtr)NativeConstants.MA_ACTIVATE; - } - } -} - -/// -/// This class adds on to the functionality provided in System.Windows.Forms.MenuStrip. -/// -public class StatusStripEx : StatusStrip -{ - /// - /// Gets or sets whether the ToolStripEx honors item clicks when its containing form does - /// not have input focus. - /// - public bool ClickThrough { get; set; } = true; - - protected override void WndProc(ref Message m) - { - base.WndProc(ref m); - if (ClickThrough - && m.Msg == NativeConstants.WM_MOUSEACTIVATE - && m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT) - { - m.Result = (IntPtr)NativeConstants.MA_ACTIVATE; - } - } -} - -internal sealed class NativeConstants -{ - private NativeConstants(){} - internal const uint WM_MOUSEACTIVATE = 0x21; - internal const uint MA_ACTIVATE = 1; - internal const uint MA_ACTIVATEANDEAT = 2; - internal const uint MA_NOACTIVATE = 3; - internal const uint MA_NOACTIVATEANDEAT = 4; -} \ No newline at end of file diff --git a/src/BizHawk.Client.EmuHawk/LogWindow.Designer.cs b/src/BizHawk.Client.EmuHawk/LogWindow.Designer.cs index ad16bf877e..87d33ada64 100644 --- a/src/BizHawk.Client.EmuHawk/LogWindow.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/LogWindow.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class LogWindow { diff --git a/src/BizHawk.Client.EmuHawk/MainForm.Designer.cs b/src/BizHawk.Client.EmuHawk/MainForm.Designer.cs index 1ca63f4b12..d80e29181e 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class MainForm { @@ -380,7 +382,6 @@ // // MainformMenu // - this.MainformMenu.ClickThrough = true; this.MainformMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu, this.EmulationSubMenu, @@ -2642,7 +2643,6 @@ // // MainStatusBar // - this.MainStatusBar.ClickThrough = true; this.MainStatusBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.DumpStatusButton, this.EmuStatus, diff --git a/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.Designer.cs b/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.Designer.cs index f244833531..85548ce6ac 100644 --- a/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class FirmwaresConfig { @@ -192,7 +194,6 @@ // // toolStrip1 // - this.toolStrip1.ClickThrough = true; this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tbbGroup, this.toolStripSeparator2, diff --git a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.Designer.cs index 8a2b2ff906..337ca42e59 100644 --- a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class BasicBot { @@ -143,7 +145,6 @@ // // BotMenu // - this.BotMenu.ClickThrough = true; this.BotMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu, this.OptionsSubMenu, diff --git a/src/BizHawk.Client.EmuHawk/tools/CDL.designer.cs b/src/BizHawk.Client.EmuHawk/tools/CDL.designer.cs index 04ef787289..4ebac7f046 100644 --- a/src/BizHawk.Client.EmuHawk/tools/CDL.designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/CDL.designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class CDL { @@ -59,7 +61,6 @@ // // menuStrip1 // - this.menuStrip1.ClickThrough = true; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); @@ -193,7 +194,6 @@ // // toolStrip1 // - this.toolStrip1.ClickThrough = true; this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbLoggingActive, this.toolStripSeparator3, diff --git a/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.Designer.cs index 572cfd6509..baab0d3ab5 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class Cheats { @@ -159,7 +161,6 @@ // // CheatsMenu // - this.CheatsMenu.ClickThrough = true; this.CheatsMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu, this.CheatsSubMenu, @@ -437,7 +438,6 @@ // // toolStrip1 // - this.toolStrip1.ClickThrough = true; this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.NewToolBarItem, this.OpenToolBarItem, diff --git a/src/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Designer.cs index 0d057ac2f0..46874bb3da 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class GenericDebugger { @@ -65,7 +67,6 @@ // // menuStrip1 // - this.menuStrip1.ClickThrough = true; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem, this.DebugSubMenu}); diff --git a/src/BizHawk.Client.EmuHawk/tools/Genesis/VDPViewer.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/Genesis/VDPViewer.Designer.cs index a1df85f8df..b2350deb62 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Genesis/VDPViewer.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Genesis/VDPViewer.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class GenVdpViewer { @@ -155,7 +157,6 @@ // // menuStrip1 // - this.menuStrip1.ClickThrough = true; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); diff --git a/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.Designer.cs index cb70177dd4..3d1ebb35d0 100644 --- a/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class HexEditor { @@ -98,7 +100,6 @@ // // HexMenuStrip // - this.HexMenuStrip.ClickThrough = true; this.HexMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu, this.EditMenuItem, diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.Designer.cs index b6b6c44a72..d879c50380 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class LuaConsole { @@ -190,7 +192,6 @@ // // menuStrip1 // - this.menuStrip1.ClickThrough = true; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu, this.ScriptSubMenu, @@ -639,7 +640,6 @@ // // toolStrip1 // - this.toolStrip1.ClickThrough = true; this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.NewScriptToolbarItem, this.OpenScriptToolbarItem, diff --git a/src/BizHawk.Client.EmuHawk/tools/NES/NESMusicRipper.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/NES/NESMusicRipper.Designer.cs index 2c13589cd7..db4f965830 100644 --- a/src/BizHawk.Client.EmuHawk/tools/NES/NESMusicRipper.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/NES/NESMusicRipper.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class NESMusicRipper { @@ -140,7 +142,6 @@ // // menuStrip1 // - this.menuStrip1.ClickThrough = true; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); diff --git a/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.Designer.cs index 4f2500965b..aa0acff4d6 100644 --- a/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class NESNameTableViewer { @@ -129,7 +131,6 @@ // // menuStrip1 // - this.menuStrip1.ClickThrough = true; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); diff --git a/src/BizHawk.Client.EmuHawk/tools/NES/NESPPU.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/NES/NESPPU.Designer.cs index fc2a8c69af..39209330a5 100644 --- a/src/BizHawk.Client.EmuHawk/tools/NES/NESPPU.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/NES/NESPPU.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class NesPPU { @@ -463,7 +465,6 @@ // // NesPPUMenu // - this.NesPPUMenu.ClickThrough = true; this.NesPPUMenu.ImageScalingSize = new System.Drawing.Size(20, 20); this.NesPPUMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu, @@ -722,7 +723,6 @@ // // NesPPUStatusBar // - this.NesPPUStatusBar.ClickThrough = true; this.NesPPUStatusBar.ImageScalingSize = new System.Drawing.Size(20, 20); this.NesPPUStatusBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripStatusLabel1}); diff --git a/src/BizHawk.Client.EmuHawk/tools/PCE/PCEBGViewer.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/PCE/PCEBGViewer.Designer.cs index 8b9aa20927..511072c1a1 100644 --- a/src/BizHawk.Client.EmuHawk/tools/PCE/PCEBGViewer.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/PCE/PCEBGViewer.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class PceBgViewer { @@ -57,7 +59,6 @@ // // PceBgViewerMenu // - this.PceBgViewerMenu.ClickThrough = true; this.PceBgViewerMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.ViewerSubMenu}); this.PceBgViewerMenu.Location = new System.Drawing.Point(0, 0); diff --git a/src/BizHawk.Client.EmuHawk/tools/PCE/PCESoundDebugger.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/PCE/PCESoundDebugger.Designer.cs index e46dec314b..5d39a38cc6 100644 --- a/src/BizHawk.Client.EmuHawk/tools/PCE/PCESoundDebugger.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/PCE/PCESoundDebugger.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class PCESoundDebugger { @@ -245,7 +247,6 @@ // // SoundMenuStrip // - this.SoundMenuStrip.ClickThrough = true; this.SoundMenuStrip.Location = new System.Drawing.Point(0, 0); this.SoundMenuStrip.Name = "SoundMenuStrip"; this.SoundMenuStrip.Size = new System.Drawing.Size(787, 24); diff --git a/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.Designer.cs index 78cf64a989..5749fa2fe6 100644 --- a/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class PceTileViewer { @@ -122,7 +124,6 @@ // // menuStrip1 // - this.menuStrip1.ClickThrough = true; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); diff --git a/src/BizHawk.Client.EmuHawk/tools/SMS/VDPViewer.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/SMS/VDPViewer.Designer.cs index f8159ed24b..6d6a7e6e9c 100644 --- a/src/BizHawk.Client.EmuHawk/tools/SMS/VDPViewer.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/SMS/VDPViewer.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class SmsVdpViewer { @@ -111,7 +113,6 @@ // // menuStrip1 // - this.menuStrip1.ClickThrough = true; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); diff --git a/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.Designer.cs index 17f20ab2a1..efbffca844 100644 --- a/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class SNESGraphicsDebugger { @@ -271,7 +273,6 @@ // // menuStrip1 // - this.menuStrip1.ClickThrough = true; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs index a0007b2f4f..9fa8894cdf 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class TAStudio { @@ -204,7 +206,6 @@ // // TASMenu // - this.TASMenu.ClickThrough = true; this.TASMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu, this.EditSubMenu, @@ -1237,7 +1238,6 @@ // // TasStatusStrip // - this.TasStatusStrip.ClickThrough = true; this.TasStatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.MessageStatusLabel, this.SavingProgressBar, diff --git a/src/BizHawk.Client.EmuHawk/tools/TI83/TI83KeyPad.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/TI83/TI83KeyPad.Designer.cs index 6a8b6e47ac..cae0bdc49d 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TI83/TI83KeyPad.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TI83/TI83KeyPad.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class TI83KeyPad { @@ -172,7 +174,6 @@ // // menuStrip1 // - this.menuStrip1.ClickThrough = true; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripMenuItem1, this.KeyPadSubMenu, diff --git a/src/BizHawk.Client.EmuHawk/tools/ToolBox.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/ToolBox.Designer.cs index 8f97e400ab..36151de0e0 100644 --- a/src/BizHawk.Client.EmuHawk/tools/ToolBox.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/ToolBox.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class ToolBox { @@ -38,7 +40,6 @@ | System.Windows.Forms.AnchorStyles.Right))); this.ToolBoxStrip.AutoSize = false; this.ToolBoxStrip.BackColor = System.Drawing.SystemColors.Control; - this.ToolBoxStrip.ClickThrough = true; this.ToolBoxStrip.Dock = System.Windows.Forms.DockStyle.None; this.ToolBoxStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.ToolBoxStrip.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow; diff --git a/src/BizHawk.Client.EmuHawk/tools/TraceLogger.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/TraceLogger.Designer.cs index 5ab9b8f204..9d97b52bae 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TraceLogger.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TraceLogger.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class TraceLogger { @@ -125,7 +127,6 @@ // // menuStrip1 // - this.menuStrip1.ClickThrough = true; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu, this.EditSubMenu, diff --git a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.Designer.cs index 86f97c6e28..e7e70b37e9 100644 --- a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class VirtualpadTool { @@ -96,7 +98,6 @@ // // PadMenu // - this.PadMenu.ClickThrough = true; this.PadMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.PadsSubMenu, this.SettingsSubMenu}); diff --git a/src/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.Designer.cs index ec478f9e1f..7957d00927 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class RamSearch { @@ -300,7 +302,6 @@ // // RamSearchMenu // - this.RamSearchMenu.ClickThrough = true; this.RamSearchMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem, this.settingsToolStripMenuItem, @@ -948,7 +949,6 @@ // // toolStrip1 // - this.toolStrip1.ClickThrough = true; this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.DoSearchToolButton, this.toolStripSeparator10, diff --git a/src/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs index 9339d8a207..6d7b162b27 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs @@ -1,4 +1,6 @@ -namespace BizHawk.Client.EmuHawk +using BizHawk.WinForms.Controls; + +namespace BizHawk.Client.EmuHawk { partial class RamWatch { @@ -274,7 +276,6 @@ // // statusStrip1 // - this.statusStrip1.ClickThrough = true; this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.ErrorIconButton, this.MessageLabel}); @@ -302,7 +303,6 @@ // // toolStrip1 // - this.toolStrip1.ClickThrough = true; this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.newToolStripButton, this.openToolStripButton, @@ -466,7 +466,6 @@ // // RamWatchMenu // - this.RamWatchMenu.ClickThrough = true; this.RamWatchMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileSubMenu, this.WatchesSubMenu, diff --git a/src/BizHawk.WinForms.Controls/MenuEx/MenuStripEx.cs b/src/BizHawk.WinForms.Controls/MenuEx/MenuStripEx.cs new file mode 100644 index 0000000000..4e7b63b5c8 --- /dev/null +++ b/src/BizHawk.WinForms.Controls/MenuEx/MenuStripEx.cs @@ -0,0 +1,21 @@ +using System; +using System.Windows.Forms; + +namespace BizHawk.WinForms.Controls +{ + /// + /// This class adds on to the functionality provided in . + /// + public class MenuStripEx : MenuStrip + { + protected override void WndProc(ref Message m) + { + base.WndProc(ref m); + if (m.Msg == NativeConstants.WM_MOUSEACTIVATE + && m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT) + { + m.Result = (IntPtr)NativeConstants.MA_ACTIVATE; + } + } + } +} diff --git a/src/BizHawk.WinForms.Controls/MenuEx/StatusStripEx.cs b/src/BizHawk.WinForms.Controls/MenuEx/StatusStripEx.cs new file mode 100644 index 0000000000..c017f684fe --- /dev/null +++ b/src/BizHawk.WinForms.Controls/MenuEx/StatusStripEx.cs @@ -0,0 +1,21 @@ +using System; +using System.Windows.Forms; + +namespace BizHawk.WinForms.Controls +{ + /// + /// This class adds on to the functionality provided in . + /// + public class StatusStripEx : StatusStrip + { + protected override void WndProc(ref Message m) + { + base.WndProc(ref m); + if (m.Msg == NativeConstants.WM_MOUSEACTIVATE + && m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT) + { + m.Result = (IntPtr)NativeConstants.MA_ACTIVATE; + } + } + } +} diff --git a/src/BizHawk.WinForms.Controls/MenuEx/ToolStripEx.cs b/src/BizHawk.WinForms.Controls/MenuEx/ToolStripEx.cs new file mode 100644 index 0000000000..de9b99cbbc --- /dev/null +++ b/src/BizHawk.WinForms.Controls/MenuEx/ToolStripEx.cs @@ -0,0 +1,32 @@ +using System; +using System.Windows.Forms; + +//credit: http://blogs.msdn.com/b/rickbrew/archive/2006/01/09/511003.aspx +namespace BizHawk.WinForms.Controls +{ + /// + /// This class adds on to the functionality provided in . + /// + public class ToolStripEx : ToolStrip + { + protected override void WndProc(ref Message m) + { + base.WndProc(ref m); + if (m.Msg == NativeConstants.WM_MOUSEACTIVATE + && m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT) + { + m.Result = (IntPtr)NativeConstants.MA_ACTIVATE; + } + } + } + + internal sealed class NativeConstants + { + private NativeConstants() { } + internal const uint WM_MOUSEACTIVATE = 0x21; + internal const uint MA_ACTIVATE = 1; + internal const uint MA_ACTIVATEANDEAT = 2; + internal const uint MA_NOACTIVATE = 3; + internal const uint MA_NOACTIVATEANDEAT = 4; + } +} \ No newline at end of file