Display: Cloud | List
Most Popular Tags
Results (56 total) All > enum (x)
VB11 declaration (GetGuiResources function (Windows))
Friend Declare Function GetGuiResources Lib "User32.dll" (hProcess As IntPtr, uiFlags As UIFlags) As Integer Friend Enum UIFlags As Integer GdiObjects = 0 GdiObjectsPeak = 2 UserObjects = 1 UserObjectsPeak = 4End Enum
Last modified by Đonny on 11/10/2012 10:22:51 PM
Tags:  declaration  enum  function  gdi+  winapi
Sample Using PowerShell (KnownColor Enumeration (System.Drawing))
<#.SYNOPSIS This script shows formatting of enums.DESCRIPTION This script iteraties through two enums and uses tostring and enum format strings to display the enum's values..NOTES File Name : Show-EnumFormat.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell Version 2.0.LINK This script posted to: http://www.pshscripts.blogspot.com MSDN sampl
Last modified by Thomas Lee on 11/10/2011 3:36:36 PM
<completionlist> (Recommended XML Tags for Documentation Comments (Visual Basic))
Have you ever wondered how it is possible that class System.Drawing.Color behaves in Visual Basic editor like enumeration though it is not enumeration? I mean - when you have code like this: Dim col As ColorCol = | When you type 2nd line and you are at place of | list of known colors appears.This nice undocumented feature of Visual Studio is not achieved via custom attributes as you may
Last modified by Đonny on 10/19/2010 9:09:22 AM
LNK2019 (Enumerating All Processes (Windows))
workaround should be found here http://blogs.msdn.com/b/vcblog/archive/2009/08/27/windows-sdk-v7-0-v7-0a-incompatibility-workaround.aspxfrom win7 the dll architecture changed for performance reasons, some function are not in psapi but in kernel32. refer to the article for a full explanation.
Last modified by Gallo_Teo on 9/30/2010 3:44:32 PM
Zero coerces very easyli into enums (enum (C# Reference))
Using the above sample code, assume you have two methods like this:.Add(object constant).Add(Days day)and you call it like this:myObject.Add(0); // that is the number zeroit will call the .Add(Days day) overload. This puzzled me for quite some time, sincemyObject.Add(1)will call the .Add(object constant) overload instead. Doesn't seem very logical to me.
Last modified by Torben Rahbek Koch on 3/21/2010 4:20:26 PM
Tags:  c#  enum  overload
for egenum days{sun, mon, tue,wed,thu,fri,sat};here sun has value 0n tue has 2 right?so can i reverse this?(int)days.tueso dat i can display tue by giving d value 2??? Edit by SJ at MSFT: There is an example in this topic, http://msdn.microsoft.com/en-us/library/cc138362.aspx . Add the following loop to the Days example, and you will see how it works: for (int i = 1; i <= 7; i++){ string s
Last modified by S J on 11/2/2011 12:05:35 AM
Tags:  c#  enum
On Enum's (Default Values Table (C# Reference))
The initial value of an Enum can be invalid... eum Test { one = 1, two = 2, three = 3, four = 4, ...}; Assert.AreEqual( Test.one, new Test() ); //Assert.AreEqual failed. Expected:<one>. Actual:<0>. In particular, the following code is unclear if you don't ensure that the enum parameter received is infact valid. public void Perform( Test cmd){ if (!Enum.IsDefined(cmd))
Last modified by G1 on 12/27/2009 12:16:09 PM
Tags:  enum
SFGAO Enum for Constant Values (IShellFolder::GetAttributesOf method (Windows))
Imports System.ComponentModel''' <summary>''' <b>SFGAO</b> - Attributes that can be retrieved on an item (file or folder) or set of items.''' </summary>''' <remarks>''' http://msdn.microsoft.com/en-us/library/bb762589(VS.85).aspx''' </remarks><Flags()> _Public Enum FileFlags As UInt32 'ASAP:MSDNSFGAO_BROWSABLE = &H8000000UISFGAO_CANCOPY = &H1SF
Last modified by AMissico on 12/6/2009 10:55:56 PM
&lt;completionlist> (Recommended XML Tags for Documentation Comments (Visual Basic))
Have you ever wondered how it is possible that class System.Drawing.Color behaves in Visual Basic editor like enumeration though it is not enumeration? I mean - when you have code like this: Dim col As ColorCol = | When you type 2nd line and you are at place of | list of known colors appears.This nice undocumented feature of Visual Studio is not achieved via custom attributes as you may guess bu
Last modified by Đonny on 11/20/2009 11:36:09 PM
Extendable enums (enum (C#))
I nice feature, and not too hard to implement (at least in C#, since Enum is actually a class), would be enum extendability. More than once had I wished for some enum values available in one enum to be present in another one, along with others - custom defined. Some very relevant examples would be:1. Creating customized message boxes, with customized DialogResult, MessageBoxButtons and MessageBoxI
Last modified by Cristian Chelaru on 8/21/2009 9:39:46 AM
Page view tracker