├── bin └── Debug │ └── FlipWheel.exe ├── Resources └── warning-icon.png ├── .gitignore ├── Properties ├── Settings.settings ├── DataSources │ └── Flippable.datasource ├── Settings.Designer.cs ├── AssemblyInfo.cs ├── Resources.Designer.cs └── Resources.resx ├── README.md ├── Program.cs ├── FlipWheel.sln ├── Form1.cs ├── FlipWheel.csproj └── Form1.Designer.cs /bin/Debug/FlipWheel.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamie-pate/flipflop-windows-wheel/HEAD/bin/Debug/FlipWheel.exe -------------------------------------------------------------------------------- /Resources/warning-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamie-pate/flipflop-windows-wheel/HEAD/Resources/warning-icon.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | obj 2 | *.suo 3 | /bin/Debug/FlipWheel.vshost.exe.manifest 4 | /bin/Debug/FlipWheel.pdb 5 | /bin/Debug/FlipWheel.vshost.exe 6 | -------------------------------------------------------------------------------- /Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | flipflop-windows-wheel 2 | ====================== 3 | 4 | This is a C# dotnet4 application which controls the 'flipflopwheel' option in Windows, which allows you to specify how scrolling behavior works in Windows. Normally, sliding your finger down on a trackpad or scrollwheel will move the scrollbar down on a page. This setting reverses that behavior. 5 | 6 | binary: 7 | https://github.com/jamie-pate/flipflop-windows-wheel/blob/master/bin/Debug/FlipWheel.exe 8 | 9 | NOTE: *Works in Windows 10* 10 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace WindowsFormsApplication1 { 7 | static class Program { 8 | /// 9 | /// The main entry point for the application. 10 | /// 11 | [STAThread] 12 | static void Main() { 13 | Application.EnableVisualStyles(); 14 | Application.SetCompatibleTextRenderingDefault(false); 15 | Application.Run(new Form1()); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Properties/DataSources/Flippable.datasource: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | WindowsFormsApplication1.Flippable, FlipWheel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.544 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace WindowsFormsApplication1.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /FlipWheel.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual C# Express 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlipWheel", "FlipWheel.csproj", "{F4FE132A-7439-46FF-9F12-CEE8100B4510}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Debug|x86 = Debug|x86 10 | Release|Any CPU = Release|Any CPU 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {F4FE132A-7439-46FF-9F12-CEE8100B4510}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {F4FE132A-7439-46FF-9F12-CEE8100B4510}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {F4FE132A-7439-46FF-9F12-CEE8100B4510}.Debug|x86.ActiveCfg = Debug|x86 17 | {F4FE132A-7439-46FF-9F12-CEE8100B4510}.Debug|x86.Build.0 = Debug|x86 18 | {F4FE132A-7439-46FF-9F12-CEE8100B4510}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {F4FE132A-7439-46FF-9F12-CEE8100B4510}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {F4FE132A-7439-46FF-9F12-CEE8100B4510}.Release|x86.ActiveCfg = Release|x86 21 | {F4FE132A-7439-46FF-9F12-CEE8100B4510}.Release|x86.Build.0 = Release|x86 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Flip Wheel")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Flip Wheel")] 13 | [assembly: AssemblyCopyright("Copyright Jamie Pate© 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9b580e4d-2153-4202-be1a-d09691f910f8")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.1.0.0")] 36 | [assembly: AssemblyFileVersion("1.1.0.0")] 37 | -------------------------------------------------------------------------------- /Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace WindowsFormsApplication1.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WindowsFormsApplication1.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap warning_icon { 67 | get { 68 | object obj = ResourceManager.GetObject("warning-icon", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\warning-icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | -------------------------------------------------------------------------------- /Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using Microsoft.Win32; 10 | using System.Diagnostics; 11 | using System.Security.Principal; 12 | 13 | namespace WindowsFormsApplication1 { 14 | 15 | public partial class Form1 : Form { 16 | public Form1() { 17 | InitializeComponent(); 18 | } 19 | private Flippable[] flippable; 20 | private void Form1_Load(object sender, EventArgs e) { 21 | WindowsPrincipal pricipal = new WindowsPrincipal(WindowsIdentity.GetCurrent()); 22 | bool hasAdministrativeRight = pricipal.IsInRole(WindowsBuiltInRole.Administrator); 23 | 24 | if (!hasAdministrativeRight) { 25 | RunElevated(Application.ExecutablePath); 26 | this.Close(); 27 | Application.Exit(); 28 | } 29 | 30 | //probably only want to flip mice. 31 | flippable = getFlippable("hid.mousedevice"); 32 | dgv_flippable.DataSource = flippable; 33 | foreach (var col in dgv_flippable.Columns.OfType()) { 34 | col.TrueValue = true; 35 | col.FalseValue = false; 36 | col.IndeterminateValue = null; 37 | } 38 | } 39 | private static bool RunElevated(string fileName) 40 | { 41 | //MessageBox.Show("Run: " + fileName); 42 | ProcessStartInfo processInfo = new ProcessStartInfo(); 43 | processInfo.UseShellExecute = true; 44 | processInfo.Verb = "runas"; 45 | processInfo.FileName = fileName; 46 | try 47 | { 48 | Process.Start(processInfo); 49 | return true; 50 | } 51 | catch (Win32Exception) 52 | { 53 | //Do nothing. Probably the user canceled the UAC window 54 | } 55 | return false; 56 | } 57 | 58 | private Flippable[] getFlippable(string filter) { 59 | List flips = new List(); 60 | using (RegistryKey hid = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Enum\HID\",false)) { 61 | foreach (string devicekn in hid.GetSubKeyNames()) { 62 | using (RegistryKey device = hid.OpenSubKey(devicekn,false)) { 63 | foreach (string devicekn2 in device.GetSubKeyNames()) { 64 | using (RegistryKey device2 = device.OpenSubKey(devicekn2,false)) { 65 | using (RegistryKey devparam = device2.OpenSubKey("Device Parameters",true)) { 66 | if (devparam != null) { 67 | flips.Add(new Flippable(new string[] { devicekn, devicekn2 }, device2, devparam, tmr_popup)); 68 | } 69 | } 70 | } 71 | } 72 | } 73 | } 74 | } 75 | if (filter != null) { 76 | return flips.Where(f=>f.name.Contains(filter)).ToArray(); 77 | } 78 | return flips.ToArray(); 79 | } 80 | 81 | private void dgv_flippable_MouseUp(object sender, MouseEventArgs e) { 82 | dgv_flippable.EndEdit(); 83 | } 84 | 85 | private void button1_Click(object sender, EventArgs e) { 86 | flippable = getFlippable(null); 87 | dgv_flippable.DataSource = flippable; 88 | } 89 | 90 | private void btn_flip_Click(object sender, EventArgs e) { 91 | foreach (var f in flippable) { 92 | f.vertical = true; 93 | f.horizontal = true; 94 | } 95 | dgv_flippable.DataSource = null; 96 | dgv_flippable.DataSource = flippable; 97 | } 98 | 99 | private void btn_normal_Click(object sender, EventArgs e) { 100 | foreach (var f in flippable) { 101 | f.vertical = false; 102 | f.horizontal = false; 103 | } 104 | dgv_flippable.DataSource = null; 105 | dgv_flippable.DataSource = flippable; 106 | } 107 | 108 | private void tmr_popup_Tick(object sender, EventArgs e) { 109 | tmr_popup.Enabled = false; 110 | notifyIcon1.ShowBalloonTip(99999999); 111 | } 112 | } 113 | 114 | public class Flippable { 115 | public Flippable(string[] keyPath, RegistryKey deviceKey, RegistryKey devparam, Timer timer) { 116 | this._keyPath = keyPath; 117 | IEnumerable flipValues = Flippable.valueNames 118 | .Select(v => onlyIntBool(devparam.GetValue(v, null))); 119 | this.name = (string)deviceKey.GetValue("DeviceDesc"); 120 | this._vertical = flipValues.ElementAt(0); 121 | this._horizontal = flipValues.ElementAt(1); 122 | this._timer = timer; 123 | } 124 | private bool? onlyIntBool(object value) { 125 | try { 126 | return value == null ? null : (bool?)(((int)value) != 0); 127 | } catch { 128 | return null; 129 | } 130 | } 131 | public static string[] valueNames = new string[] { "FlipFlopWheel", "FlipFlopHScroll" }; 132 | 133 | public string name { get; private set; } 134 | private string[] _keyPath; 135 | private bool? _vertical; 136 | private bool? _horizontal; 137 | Timer _timer; 138 | public bool? vertical { set { flip(Flippable.valueNames[0], value); _vertical = value; } get { return _vertical; } } 139 | public bool? horizontal { set { flip(Flippable.valueNames[1], value); _horizontal = value; } get { return _horizontal; } } 140 | 141 | public void flip(string valueName, bool? value) { 142 | using (RegistryKey hid = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Enum\HID\", false)) { 143 | using (RegistryKey device = hid.OpenSubKey(_keyPath[0], false)) { 144 | using (RegistryKey device2 = device.OpenSubKey(_keyPath[1], false)) { 145 | using (RegistryKey devparam = device2.OpenSubKey("Device Parameters", true)) { 146 | if (value == null) { 147 | devparam.DeleteValue(valueName); 148 | } else { 149 | devparam.SetValue(valueName, value == true ? 1 : 0); 150 | _timer.Enabled = true; 151 | } 152 | } 153 | } 154 | } 155 | } 156 | } 157 | 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /FlipWheel.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | x86 6 | 8.0.30703 7 | 2.0 8 | {F4FE132A-7439-46FF-9F12-CEE8100B4510} 9 | WinExe 10 | Properties 11 | WindowsFormsApplication1 12 | FlipWheel 13 | v4.0 14 | Client 15 | 512 16 | false 17 | publish\ 18 | true 19 | Disk 20 | false 21 | Foreground 22 | 7 23 | Days 24 | false 25 | false 26 | true 27 | 0 28 | 1.1.0.%2a 29 | false 30 | true 31 | 32 | 33 | x86 34 | true 35 | full 36 | false 37 | bin\Debug\ 38 | DEBUG;TRACE 39 | prompt 40 | 4 41 | false 42 | 43 | 44 | x86 45 | pdbonly 46 | true 47 | bin\Release\ 48 | TRACE 49 | prompt 50 | 4 51 | 52 | 53 | 54 | false 55 | 56 | 57 | 58 | 59 | 60 | 61 | true 62 | bin\Debug\ 63 | DEBUG;TRACE 64 | full 65 | AnyCPU 66 | prompt 67 | false 68 | false 69 | 70 | 71 | bin\Release\ 72 | TRACE 73 | true 74 | pdbonly 75 | AnyCPU 76 | prompt 77 | false 78 | false 79 | false 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | Form 96 | 97 | 98 | Form1.cs 99 | 100 | 101 | 102 | 103 | Form1.cs 104 | 105 | 106 | ResXFileCodeGenerator 107 | Resources.Designer.cs 108 | Designer 109 | 110 | 111 | True 112 | Resources.resx 113 | True 114 | 115 | 116 | 117 | SettingsSingleFileGenerator 118 | Settings.Designer.cs 119 | 120 | 121 | True 122 | Settings.settings 123 | True 124 | 125 | 126 | 127 | 128 | False 129 | Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 130 | true 131 | 132 | 133 | False 134 | .NET Framework 3.5 SP1 Client Profile 135 | false 136 | 137 | 138 | False 139 | .NET Framework 3.5 SP1 140 | false 141 | 142 | 143 | False 144 | Windows Installer 3.1 145 | true 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 160 | -------------------------------------------------------------------------------- /Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace WindowsFormsApplication1 { 2 | partial class Form1 { 3 | /// 4 | /// Required designer variable. 5 | /// 6 | private System.ComponentModel.IContainer components = null; 7 | 8 | /// 9 | /// Clean up any resources being used. 10 | /// 11 | /// true if managed resources should be disposed; otherwise, false. 12 | protected override void Dispose(bool disposing) { 13 | if (disposing && (components != null)) { 14 | components.Dispose(); 15 | } 16 | base.Dispose(disposing); 17 | } 18 | 19 | #region Windows Form Designer generated code 20 | 21 | /// 22 | /// Required method for Designer support - do not modify 23 | /// the contents of this method with the code editor. 24 | /// 25 | private void InitializeComponent() { 26 | this.components = new System.ComponentModel.Container(); 27 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); 28 | this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); 29 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); 30 | this.btn_showAll = new System.Windows.Forms.Button(); 31 | this.dgv_flippable = new System.Windows.Forms.DataGridView(); 32 | this.btn_flip = new System.Windows.Forms.Button(); 33 | this.btn_normal = new System.Windows.Forms.Button(); 34 | this.tmr_popup = new System.Windows.Forms.Timer(this.components); 35 | this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); 36 | this.verticalDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); 37 | this.horizontalDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); 38 | this.flippableBindingSource = new System.Windows.Forms.BindingSource(this.components); 39 | this.tableLayoutPanel1.SuspendLayout(); 40 | ((System.ComponentModel.ISupportInitialize)(this.dgv_flippable)).BeginInit(); 41 | ((System.ComponentModel.ISupportInitialize)(this.flippableBindingSource)).BeginInit(); 42 | this.SuspendLayout(); 43 | // 44 | // notifyIcon1 45 | // 46 | this.notifyIcon1.BalloonTipText = "Please Remove usb mice and then plug them back in"; 47 | this.notifyIcon1.BalloonTipTitle = "Mousewheel Setting Successful."; 48 | this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon"))); 49 | this.notifyIcon1.Text = "notifyIcon1"; 50 | this.notifyIcon1.Visible = true; 51 | // 52 | // tableLayoutPanel1 53 | // 54 | this.tableLayoutPanel1.ColumnCount = 4; 55 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 56 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 57 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 58 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 59 | this.tableLayoutPanel1.Controls.Add(this.btn_showAll, 2, 0); 60 | this.tableLayoutPanel1.Controls.Add(this.dgv_flippable, 0, 1); 61 | this.tableLayoutPanel1.Controls.Add(this.btn_flip, 0, 0); 62 | this.tableLayoutPanel1.Controls.Add(this.btn_normal, 1, 0); 63 | this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; 64 | this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); 65 | this.tableLayoutPanel1.Name = "tableLayoutPanel1"; 66 | this.tableLayoutPanel1.RowCount = 2; 67 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); 68 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); 69 | this.tableLayoutPanel1.Size = new System.Drawing.Size(599, 529); 70 | this.tableLayoutPanel1.TabIndex = 0; 71 | // 72 | // btn_showAll 73 | // 74 | this.btn_showAll.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; 75 | this.btn_showAll.Dock = System.Windows.Forms.DockStyle.Top; 76 | this.btn_showAll.Image = ((System.Drawing.Image)(resources.GetObject("btn_showAll.Image"))); 77 | this.btn_showAll.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 78 | this.btn_showAll.Location = new System.Drawing.Point(394, 3); 79 | this.btn_showAll.Name = "btn_showAll"; 80 | this.btn_showAll.Size = new System.Drawing.Size(191, 23); 81 | this.btn_showAll.TabIndex = 3; 82 | this.btn_showAll.Text = "Show All"; 83 | this.btn_showAll.UseVisualStyleBackColor = true; 84 | this.btn_showAll.Click += new System.EventHandler(this.button1_Click); 85 | // 86 | // dgv_flippable 87 | // 88 | this.dgv_flippable.AutoGenerateColumns = false; 89 | this.dgv_flippable.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { 90 | this.nameDataGridViewTextBoxColumn, 91 | this.verticalDataGridViewTextBoxColumn, 92 | this.horizontalDataGridViewTextBoxColumn}); 93 | this.tableLayoutPanel1.SetColumnSpan(this.dgv_flippable, 4); 94 | this.dgv_flippable.DataSource = this.flippableBindingSource; 95 | this.dgv_flippable.Dock = System.Windows.Forms.DockStyle.Fill; 96 | this.dgv_flippable.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter; 97 | this.dgv_flippable.Location = new System.Drawing.Point(3, 32); 98 | this.dgv_flippable.Name = "dgv_flippable"; 99 | this.dgv_flippable.Size = new System.Drawing.Size(593, 494); 100 | this.dgv_flippable.TabIndex = 2; 101 | this.dgv_flippable.MouseUp += new System.Windows.Forms.MouseEventHandler(this.dgv_flippable_MouseUp); 102 | // 103 | // btn_flip 104 | // 105 | this.btn_flip.Dock = System.Windows.Forms.DockStyle.Top; 106 | this.btn_flip.Location = new System.Drawing.Point(3, 3); 107 | this.btn_flip.Name = "btn_flip"; 108 | this.btn_flip.Size = new System.Drawing.Size(189, 23); 109 | this.btn_flip.TabIndex = 0; 110 | this.btn_flip.Text = "Flip All"; 111 | this.btn_flip.UseVisualStyleBackColor = true; 112 | this.btn_flip.Click += new System.EventHandler(this.btn_flip_Click); 113 | // 114 | // btn_normal 115 | // 116 | this.btn_normal.Dock = System.Windows.Forms.DockStyle.Top; 117 | this.btn_normal.Location = new System.Drawing.Point(198, 3); 118 | this.btn_normal.Name = "btn_normal"; 119 | this.btn_normal.Size = new System.Drawing.Size(190, 23); 120 | this.btn_normal.TabIndex = 1; 121 | this.btn_normal.Text = "All Normal"; 122 | this.btn_normal.UseVisualStyleBackColor = true; 123 | this.btn_normal.Click += new System.EventHandler(this.btn_normal_Click); 124 | // 125 | // tmr_popup 126 | // 127 | this.tmr_popup.Interval = 3000; 128 | this.tmr_popup.Tick += new System.EventHandler(this.tmr_popup_Tick); 129 | // 130 | // nameDataGridViewTextBoxColumn 131 | // 132 | this.nameDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; 133 | this.nameDataGridViewTextBoxColumn.DataPropertyName = "name"; 134 | this.nameDataGridViewTextBoxColumn.HeaderText = "Device Name"; 135 | this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn"; 136 | this.nameDataGridViewTextBoxColumn.ReadOnly = true; 137 | // 138 | // verticalDataGridViewTextBoxColumn 139 | // 140 | this.verticalDataGridViewTextBoxColumn.DataPropertyName = "vertical"; 141 | this.verticalDataGridViewTextBoxColumn.HeaderText = "Vertical Scroll"; 142 | this.verticalDataGridViewTextBoxColumn.Name = "verticalDataGridViewTextBoxColumn"; 143 | this.verticalDataGridViewTextBoxColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True; 144 | this.verticalDataGridViewTextBoxColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; 145 | this.verticalDataGridViewTextBoxColumn.ThreeState = true; 146 | // 147 | // horizontalDataGridViewTextBoxColumn 148 | // 149 | this.horizontalDataGridViewTextBoxColumn.DataPropertyName = "horizontal"; 150 | this.horizontalDataGridViewTextBoxColumn.HeaderText = "Horizontal Scroll"; 151 | this.horizontalDataGridViewTextBoxColumn.Name = "horizontalDataGridViewTextBoxColumn"; 152 | this.horizontalDataGridViewTextBoxColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True; 153 | this.horizontalDataGridViewTextBoxColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; 154 | this.horizontalDataGridViewTextBoxColumn.ThreeState = true; 155 | // 156 | // flippableBindingSource 157 | // 158 | this.flippableBindingSource.DataSource = typeof(WindowsFormsApplication1.Flippable); 159 | // 160 | // Form1 161 | // 162 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 163 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 164 | this.ClientSize = new System.Drawing.Size(599, 529); 165 | this.Controls.Add(this.tableLayoutPanel1); 166 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 167 | this.Name = "Form1"; 168 | this.Text = "Flip Mouse Wheel"; 169 | this.Load += new System.EventHandler(this.Form1_Load); 170 | this.tableLayoutPanel1.ResumeLayout(false); 171 | ((System.ComponentModel.ISupportInitialize)(this.dgv_flippable)).EndInit(); 172 | ((System.ComponentModel.ISupportInitialize)(this.flippableBindingSource)).EndInit(); 173 | this.ResumeLayout(false); 174 | 175 | } 176 | 177 | #endregion 178 | 179 | private System.Windows.Forms.NotifyIcon notifyIcon1; 180 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; 181 | private System.Windows.Forms.DataGridView dgv_flippable; 182 | private System.Windows.Forms.Button btn_flip; 183 | private System.Windows.Forms.Button btn_normal; 184 | private System.Windows.Forms.BindingSource flippableBindingSource; 185 | private System.Windows.Forms.Button btn_showAll; 186 | private System.Windows.Forms.Timer tmr_popup; 187 | private System.Windows.Forms.DataGridViewTextBoxColumn nameDataGridViewTextBoxColumn; 188 | private System.Windows.Forms.DataGridViewCheckBoxColumn verticalDataGridViewTextBoxColumn; 189 | private System.Windows.Forms.DataGridViewCheckBoxColumn horizontalDataGridViewTextBoxColumn; 190 | } 191 | } 192 | 193 | --------------------------------------------------------------------------------