POST vs post, GET vs get

W3C has tended towards lowercase for attribute names and values for a while. For example section 4.11 of the xhtml 1.0 standard in 2002: 4.11. Attributes with pre-defined value sets HTML 4 and XHTML both have some attributes that have pre-defined and limited sets of values (e.g. the type attribute of the input element). In … Read more

How can I find the state of NumLock, CapsLock and ScrollLock in .NET?

Import the WinAPI function GetKeyState: [DllImport(“user32.dll”, CharSet = CharSet.Auto, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)] public static extern short GetKeyState(int keyCode); And then you can use it like this: bool CapsLock = (((ushort)GetKeyState(0x14)) & 0xffff) != 0; bool NumLock = (((ushort)GetKeyState(0x90)) & 0xffff) != 0; bool ScrollLock = (((ushort)GetKeyState(0x91)) & 0xffff) != 0; It is … Read more