C # form is fixed on the desktop

2010-11-19  来源:本站原创  分类:DotNet  人气:77 

[DllImport ("user32.dll", EntryPoint = "RemoveMenu")]
public static extern int RemoveMenu (IntPtr hMenu, int nPosition, int wFlags);
[DllImport ("user32.dll", EntryPoint = "GetSystemMenu")]
public static extern IntPtr GetSystemMenu (IntPtr hwnd, int bRevert);
public const int SC_MOVE = 61456;
public const int MF_BYCOMMAND = 0;
public const int MF_DISABLED = 2;

public const int MF_GRAYED = 1;

private void button1_Click (object sender, EventArgs e)
{
IntPtr hMenu = GetSystemMenu (this.Handle, 0);
RemoveMenu (hMenu, SC_MOVE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
}

相关文章
  • C # form is fixed on the desktop 2010-11-19

    [DllImport ("user32.dll", EntryPoint = "RemoveMenu")] public static extern int RemoveMenu (IntPtr hMenu, int nPosition, int wFlags); [DllImport ("user32.dll", EntryPoint = "GetSystemMenu")] public static extern IntP

  • How to form a fixed width, so that the contents of the excess wrap 2009-02-02

    <table>

  • Ported to FreeBSD from Linux 2011-05-25

    FreeBSD and various Linux distributions, is a free Unix-like operating system. Since the launch later in FreeBSD Linux, FreeBSD article therefore introduces less domestic, but also because of some irresponsible coal fueled, Linux has been greatly exa

  • From Linux to FreeBSD 2011-05-25

    FreeBSD and various Linux distributions, is a free Unix-like operating system. Since the launch later in FreeBSD Linux, FreeBSD article therefore introduces less domestic, but also because of some irresponsible coal fueled, Linux is exaggerated myth.

  • Soybean protein fiber knitted urea peroxide bleaching 2010-02-14

    Keywords: bleach, peroxide, knitted fabric, soybean protein fiber Shen Gaga, Luo Xiaoju (Zhejiang University, Hangzhou 310012) O Introduction peroxide [CO (NH2) 2 · H2O2], also known as urea hydrogen peroxide, carbamide peroxide, than carbon dioxide

  • Rotary screen easy on the glue solution 2010-02-18

    Keywords: nickel screen Shape: round plastic line, due to the low mesh, mesh large, easy to glue into the wall. Reason: Nickel Screen quality; sensitive viscosity is not good control; The hardness of squeegee is too soft ring; the glue does not contr

  • I think Microsoft. NET prospect of the technology 2010-04-18

    Original link: http://www.cnblogs.com/bitfan/archive/2010/03/03/1677139.html 2002 release. NET 1.0, after 8 years of development,. NET development to a 4.0, has become a large and complex software development and operating platform, the increasing co

  • HTML5 compatible with all major browsers Cheat 2010-04-23

    HTML5 browsers support more and more, even including the latest version of IE, of course, support is only part of the so-called support for the W3C HTML5 specification is not yet formed. If you want to use the HTML5 to create your site, at least on a

  • 2010 most popular site optimization 2010-05-26

    In today's ever-changing web site optimization, single * place with a few key words have been repeated Website Optimization techniques to follow the past 08 Olympic Games. Standing on the technical frontier website optimization, the total of the Webs

  • Around the opening of several telecommunications capacity 2010-06-12

    IVR IVR, (Interactive Voice Response) interactive voice response system, you only need to enter the service center by telephone, under the operation of mobile entertainment products prompts to listen to. Content based on user input information about

  • Project Management Classic Monitor 2010-09-15

    1, China is full of a lot of very dedicated professional project managers but not enough, do not understand this, it is good to do projects in China. 2, the real reasons are often hidden behind the surface of the ground. 3, the highest state of a pro

  • I do the project all these years (autumn is how well the project manager - the black humor 313) | How to Project Manager after -70 ... (Reprinted) 2010-09-25

    Akiba , Xiao Qiushui co new book, " ahead of the competition - big projects before and after sales of 30 kinds of skills , "wrote the book side of Akiba attention big project consultants, business and implement some of the sentiment, the section

  • The key technologies involved Hlink VPN (tunneling technology introduction. The second layer of the tunnel and the third layer of the tunnel) 2010-12-14

    The key technologies involved Hlink VPN (tunneling technology introduction, the second layer and third layer of the tunnel Tunnel) VPN is a network on the surface the way, than the line network, it has many advantages. In the VPN, by use of a so-call

  • Basic C + + code and complete annotation window 2011-01-13

    This article comes from: http://hi.baidu.com/% D1% B7% D7% A9% B7% B1% C9% B3/blog/item/471cde12702782d8f7039e9f.html Basic C + + code and complete annotation window 2009-05-31 18:51 / / I wrote a C + + windows application framework code, for referen

  • Internet companies in the technology selection DDOS Defense Talk 2011-04-11

    A friend asked me to buy him choose a hardware firewall to study the results obtained for several hours: Said first conclusion, the conclusion is simple: Iptables in the IP layer can only be used against a simple DDOS, can only use mod_security and o

  • 10 kinds of programmers you'll encounter (translation) 2007-12-09

    A few days ago to see someone in the javalobby discuss this article, I feel it is very humorous writing, it is translated over, because the translation level is limited, so with the original, we feel very bad place to turn to see the original bar. Or

  • Internet company's technology selection DDOS Defense Talk 2011-04-11

    A friend asked me to buy him choose a hardware firewall to study the results obtained a few hours: Said first conclusion, the conclusion is simple: Iptables can only be used in the IP layer anti simple DDOS, only with mod_security or other self-devel

  • Hlink VPN involving key technologies (tunneling technology introduced the second floor and third floor tunnel tunnel) 2010-12-14

    Hlink VPN involving key technologies (tunneling technology introduction, the second layer and third layer of the tunnel the tunnel) VPN on the surface is a way of networking than line network, it has many advantages. A VPN, through the use of a so-ca

  • The creation of a form of regular desktop class 2010-10-07

    [Align = left] [/ align] 1: swing components to create a common seven visible form: 1 javax.swing.JFrame jf = new javax.swing.JFrame (); 2 jf.setTitle (); 3 jf.setSize (); 4 jf.setResizable (); 5 jf.setDefaultCloseOperation (3); 6 jf.setLocationRelat

  • Mandatory fixed form 2010-12-22

    In fact, just simple words: style = "table-layout: fixed; word-break: break-all" Such as: <table width=200> <tr> <td> laksdjflkajsdflkajsdflkjalsdkfjalksdjflkajsdflkajdsflkjasdlkfjasdlkjfalkdsjflkajsdflkajdsflkjasdklfjaskdjf &l