C# to implement WinForm prohibition on maximization, minimization, double-clicking the title bar, double-clicking the icon, etc.
This article describes how C# implements WinForm prohibition to maximize, minimize, double-click the title bar, double-click the icon and other operations. Share it for your reference. The specific implementation method is as follows:
protected override void WndProc(ref Message m) { if (==0x112) { switch ((int) ) { //Don't double-click the title bar to close the form case 0xF063: case 0xF093: = ; break; //Drag the title bar to restore the form case 0xF012: case 0xF010: = ; break; //Don't double-click the title bar case 0xf122: = ; break; //Disable close button case 0xF060: = ; break; // Maximize buttons are prohibited case 0xf020: = ; break; //Disable the minimization button case 0xf030: = ; break; //Restore button prohibited case 0xf120: = ; break; } } (ref m); }
I hope this article will be helpful to everyone's C# programming.
Related Articles
Detailed explanation of C# study notes for adapter mode
This article mainly introduces the relevant information about the adapter mode of C# study notes, which has certain reference value. Interested friends can refer to it.2017-11-11Detailed explanation of hiding and disabling window close button in C# winform
This article mainly introduces the detailed explanation of the hiding and disabling of the window closing button in C# winform. It has good reference value and hopes it will be helpful to everyone. Let's take a look with the editor2020-12-12Example code of the circular linked list of C# data structure
The example code of the C# data structure loop linked list, if you need it, you can refer to it2013-03-03C# Base keyword usage
The usage example code for c# Base keywords can be used below.2009-07-07C# randomly sets 900-1100 millisecond delay
This article mainly introduces the method of randomly setting 900-1100 millisecond delay in C#, which involves the skills of using methods in C#. Friends who need it can refer to it.2015-04-04Methods for array initialization and array element copying in C#
This article mainly introduces the methods of array initialization and array element copying in C#, which involves the skills of creating, initializing and using arrays in C# to copy array elements. Friends who need it can refer to it2015-04-04C# protobuf automatically updates cs file
This article mainly introduces the relevant information of C# protobuf automatically updating cs files. It is very good and has certain reference value. Friends who need it can refer to it.2020-02-02C# to determine the format of graphics file
This article mainly introduces the method of C# to determine the format of graphics file, including common extension judgments and file content judgments. It is very practical. Friends who need it can refer to it.2014-09-09C# Simple example of creating, deploying, and calling WebService
This article mainly introduces a detailed introduction to C# simple examples of creating, deploying and calling WebService in C#. It has certain reference value. Interested friends can refer to it.2017-05-05Detailed explanation of the method example of C# synchronizing network time
This article mainly introduces the method of C# synchronizing network time, and analyzes the relevant skills of C# to obtain network time and synchronize the local system time in a more detailed manner in the form of an example. It is very practical. Friends who need it can refer to it.2015-05-05