Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "select" in [All]

kernel32

.

    // http://pinvoke.net/default.aspx/kernel32/GetConsoleSelectionInfo.html

.

    static extern bool GetConsoleSelectionInfo(

.

        CONSOLE_SELECTION_INFO ConsoleSelectionInfo

.

    public struct CONSOLE_SELECTION_INFO

.

        COORD SelectionAnchor;

.

        SMALL_RECT Selection;

.

        const uint CONSOLE_MOUSE_SELECTION = 0x0004; //Selecting with the mouse

.

        const uint CONSOLE_NO_SELECTION = 0x0000; //No selection

.

        const uint CONSOLE_SELECTION_IN_PROGRESS = 0x0001; //Selection has begun

.

        const uint CONSOLE_SELECTION_NOT_EMPTY = 0x0002; //Selection rectangle is not empty

.

FileTimeToLocalFileTime converts a time from UTC time (also known as Greenwich Mean Time) to "local time" (inside the computer's selected time zone). The source and target times are stored in FILETIME structures. The function returns 1 if successful, or 0 if an error occurs.FileTimeToLocalFileTime Converts a UTC file time to a local file time. System.DateTime.ToFileTime FileTimeToLocalFileTime Converts a UTC file time to a local file time. System.DateTime.ToLocalTime

.

                Get-ChildItem $env:windir\sysnative -filter *.exe | Get-BinaryType -ErrorAction SilentlyContinue -passthrough | select Name,BinaryType

.

Here's a method that uses this method in conjunction with GetCurrentConsoleFont to return the size of the currently selected console font.

.

    static extern bool GetConsoleSelectionInfo(

.

        CONSOLE_SELECTION_INFO ConsoleSelectionInfo

.

Declare Function GetConsoleSelectionInfo Lib "kernel32.dll" (TODO) As TODO

.

    public struct CONSOLE_SELECTION_INFO

.

        COORD SelectionAnchor;

.

        SMALL_RECT Selection;

.

        const uint CONSOLE_MOUSE_SELECTION = 0x0004; //Selecting with the mouse

.

        const uint CONSOLE_NO_SELECTION = 0x0000; //No selection

.

        const uint CONSOLE_SELECTION_IN_PROGRESS = 0x0001; //Selection has begun

.

        const uint CONSOLE_SELECTION_NOT_EMPTY = 0x0002; //Selection rectangle is not empty

.
Documentation
[GetConsoleSelectionInfo] on MSDN
.

        currencyFormat.uiLeadingZero = Convert.ToUInt32(cboLeadingZero.SelectedIndex);

.

        currencyFormat.uiNegativeOrder = Convert.ToUInt32(cboNegativeOrder.SelectedIndex);

.

        currencyFormat.uiPositiveOrder = Convert.ToUInt32(cboPositiveOrder.SelectedIndex);

.

This can be very useful while creating the Installers e.g. Wix. User can create custom actions to determine the Windows OS languages and then select the install language.

.

     public uint ErrorSelector;

.

     public uint DataSelector;

.

    public ushort ErrorSelector;

.

    public ushort DataSelector;

.
Summary
.

    static extern bool GetThreadSelectorEntry (

.

        uint dwSelector,

.

        out LDT_ENTRY lpSelectorEntry

.

    if ( !GetThreadSelectorEntry( GetCurrentThread(), cntx.SegDs, out ldt ) )

.
Documentation
[GetThreadSelectorEntry] on MSDN
.

  /// <para>To select the correct day in the month, set the wYear member to zero, the wHour and wMinute members to the transition time, the wDayOfWeek member to the appropriate weekday, and the wDay member to indicate the occurence of the day of the week within the month (first through fifth).</para>

.

  /// <para>To select the correct day in the month, set the wYear member to zero, the wHour and wMinute members to the transition time, the wDayOfWeek member to the appropriate weekday, and the wDay member to indicate the occurence of the day of the week within the month (first through fifth).</para>

.

  Select Case nColors

.

  End Select

.

Although Away Mode is supported on any Windows Vista PC, the mode must be explicitly allowed by the current power policy. The Allow Away Mode power setting enables the user to selectively allow Away Mode on one or more power plans or individually for AC and DC (on battery) power states.

.

        /// <para>To select the correct day in the month, set the wYear member to zero, the wHour and wMinute members to the transition time, the wDayOfWeek member to the appropriate weekday, and the wDay member to indicate the occurence of the day of the week within the month (first through fifth).</para>

.

        /// <para>To select the correct day in the month, set the wYear member to zero, the wHour and wMinute members to the transition time, the wDayOfWeek member to the appropriate weekday, and the wDay member to indicate the occurence of the day of the week within the month (first through fifth).</para>

.

        UInt32 ErrorSelector;

.

        UInt32 DataSelector;

dwmapi

.

To Run the VistaBridge Project in Visual Studio 2008, you must re-create the Application Manifest file. To do this, open the manifest already in the project, copy all of the text from it to notepad and then delete the manifest file from the project. Next, right click on the "VistaBridgeDemoApp" project and select Add New Item. Choose an Application Manifest File and MAKE SURE you name it as follows: VistaBridgeDemoApp.exe.manifest and then press enter. Now double click on the new manifest file, select all the text and replace it with the text that was copied out of the old manifest. You can now Build the solution and the Demo App should now operate properly. If you still have problems, try closing Visual Studio and then Re-opening it.

.

To Run the VistaBridge Project in Visual Studio 2008, you must re-create the Application Manifest file. To do this, open the manifest already in the project, copy all of the text from it to notepad and then delete the manifest file from the project. Next, right click on the "VistaBridgeDemoApp" project and select Add New Item. Choose an Application Manifest File and MAKE SURE you name it as follows: VistaBridgeDemoApp.exe.manifest and then press enter. Now double click on the new manifest file, select all the text and replace it with the text that was copied out of the old manifest. You can now Build the solution and the Demo App should now operate properly. If you still have problems, try closing Visual Studio and then Re-opening it.

cfgmgr32

.

flags, Flags that select the mode of restarting.

coredll

.

        Select Case val

.

        End Select

.

        Select Case val

.

        End Select

.

    public const UInt64 TGF_GID_SELECT           = 0x0000000000004000;

.

    public const UInt64 TGF_GID_DOUBLESELECT     = 0x0000000000008000;

.

    public const UInt64 TGF_GID_SELECT               = 0x0000000000004000;

.

    public const UInt64 TGF_GID_DOUBLESELECT         = 0x0000000000008000;

.
WARNING
This is not the REAL SelectObject. This signature uses the wrong dll. Search for the one with [DllImport("gdi32.dll" ....
.

[DllImport ("coredll.dll", EntryPoint="SelectObject", SetLastError=true)]

.

private static extern IntPtr SelectObjectCE(IntPtr hdc, IntPtr hgdiobj);

.

Declare Function SelectObject Lib "coredll.dll" (TODO) As TODO

.
Documentation
[SelectObject] on MSDN
.

    /// 13 COLOR_HIGHLIGHT Color of an item selected in a control.

.

    /// 14 COLOR_HIGHLIGHTTEXT Color of the text of an item selected in a control.

.
Summary
This function displays a floating pop-up menu at the specified location and tracks the selection of items on the pop-up menu. The floating pop-up menu can appear anywhere on the screen.
.

Use TrackPopupMenuEx with the TPM_RETURNCMD flag to return the ID of the selected Menu Item.

comctl32

.

To Run the VistaBridge Project in Visual Studio 2008, you must re-create the Application Manifest file. To do this, open the manifest already in the project, copy all of the text from it to notepad and then delete the manifest file from the project. Next, right click on the "VistaBridgeDemoApp" project and select Add New Item. Choose an Application Manifest File and MAKE SURE you name it as follows: VistaBridgeDemoApp.exe.manifest and then press enter. Now double click on the new manifest file, select all the text and replace it with the text that was copied out of the old manifest. You can now Build the solution and the Demo App should now operate properly. If you still have problems, try closing Visual Studio and then Re-opening it.

.

To Run the VistaBridge Project in Visual Studio 2008, you must re-create the Application Manifest file. To do this, open the manifest already in the project, copy all of the text from it to notepad and then delete the manifest file from the project. Next, right click on the "VistaBridgeDemoApp" project and select Add New Item. Choose an Application Manifest File and MAKE SURE you name it as follows: VistaBridgeDemoApp.exe.manifest and then press enter. Now double click on the new manifest file, select all the text and replace it with the text that was copied out of the old manifest. You can now Build the solution and the Demo App should now operate properly. If you still have problems, try closing Visual Studio and then Re-opening it.

winspool

.

       /* mode selections for the device mode function */

.

Turns out that there are some clever and powerful tools in Visual Studio 2005 and 2008 for working with the Management Classes (although couldn’t find it in the “Standard Edition” installed on this machine, definitely exists in my laptop’s Visual Studio). You can use Server Explorer to navigate a treeview to your management class (in this example, the Printers node), right-click on it and select “Generate Managed Class”. This will automagically create a strongly-typed C#.Net class representing the object model of the WMI Printers Class, with all its properties and methods.

netapi32

.
Summary
The DsGetDcName function returns the name of a domain controller in a specified domain. This function accepts additional domain controller selection criteria to indicate preference for a domain controller with particular characteristics.
.

Pointer to a PDOMAIN_CONTROLLER_INFO value that receives a pointer to a DOMAIN_CONTROLLER_INFO structure that contains data about the domain controller selected. This structure is allocated by DsGetDcName. The caller must free the structure using the NetApiBufferFree function when it is no longer required.

.

            Select Case Result

.

            End Select

.

If you want to find the user logged in to the workstation, consider instead a WMI query ("select UserName from Win32_ComputerSystem"), which has certain advantages (runs faster, less ambigious results, doesn't require Interop if using .Net 2.0 System.Management namespace, etc.)

winmm

.

Use "Auto" in the Declare statement to have the correct character set selected automatically.

mapi32

.
Summary
MAPIDetails - Displays a dialog box containing the details of a selected address list entry.
.

  /// The MAPIDetails function displays a dialog box containing the details of a selected address list entry.

winscard

.

byte[] pbSendBuffer = { 0xC0, 0xA4, 0x00, 0x00, 0x02, 0x3F, 0x00 }; // Example Cla,Ins,P1,P2,P3,DataIN (Select MF)

user32

.

Useful to create a temporary block in input for sensitive GUI operations. For instance when manually activating a screen saver from within a GUI function, a short blocking delay will prevent the user mouse movements directly after selection from accidently escaping the screen saver.

.

                uint nselected = Helpers.DragQueryFile(m_hDrop, 0xffffffff, null, 0);

.

                if (nselected == 1)

.

/// <param name="x">Specifies the initial horizontal position of the window. For an overlapped or pop-up window, the x parameter is the initial x-coordinate of the window's upper-left corner, in screen coordinates. For a child window, x is the x-coordinate of the upper-left corner of the window relative to the upper-left corner of the parent window's client area. If x is set to CW_USEDEFAULT, the system selects the default position for the window's upper-left corner and ignores the y parameter. CW_USEDEFAULT is valid only for overlapped windows; if it is specified for a pop-up or child window, the x and y parameters are set to zero.</param>

.

/// <param name="nWidth">Specifies the width, in device units, of the window. For overlapped windows, nWidth is the window's width, in screen coordinates, or CW_USEDEFAULT. If nWidth is CW_USEDEFAULT, the system selects a default width and height for the window; the default width extends from the initial x-coordinates to the right edge of the screen; the default height extends from the initial y-coordinate to the top of the icon area. CW_USEDEFAULT is valid only for overlapped windows; if CW_USEDEFAULT is specified for a pop-up or child window, the nWidth and nHeight parameter are set to zero.</param>

.

''' <param name="x">Specifies the initial horizontal position of the window. For an overlapped or pop-up window, the x parameter is the initial x-coordinate of the window's upper-left corner, in screen coordinates. For a child window, x is the x-coordinate of the upper-left corner of the window relative to the upper-left corner of the parent window's client area. If x is set to CW_USEDEFAULT, the system selects the default position for the window's upper-left corner and ignores the y parameter. CW_USEDEFAULT is valid only for overlapped windows; if it is specified for a pop-up or child window, the x and y parameters are set to zero.</param>

.

''' <param name="nWidth">Specifies the width, in device units, of the window. For overlapped windows, nWidth is the window's width, in screen coordinates, or CW_USEDEFAULT. If nWidth is CW_USEDEFAULT, the system selects a default width and height for the window; the default width extends from the initial x-coordinates to the right edge of the screen; the default height extends from the initial y-coordinate to the top of the icon area. CW_USEDEFAULT is valid only for overlapped windows; if CW_USEDEFAULT is specified for a pop-up or child window, the nWidth and nHeight parameter are set to zero.</param>

.

    internal const UInt32 MF_MOUSESELECT      =0x00008000;

.

/// Gets the data on the clipboard in the format specified by the selected item of the specified listbox.

.

     uint SelectedFormat = GetSelectedClipboardFormat(ListBox);

.

     if (SelectedFormat != 0)

.

     //Get pointer to clipboard data in the selected format

.

     IntPtr ClipboardDataPointer = GetClipboardData(SelectedFormat);

.

                VK_SELECT = 0x29,

.

                VK_LAUNCH_MEDIA_SELECT = 0xB5,

.

    VK_SELECT    = 0x29,

.

    VK_LAUNCH_MEDIA_SELECT= 0xB5,

.

            Me.SelectionLength = 1

.

    If Selection.poStatus <> Selection.EnumSelection.NoSelection Then

.

        Dim loSelected As RECT

.

        loSelected.Left = Selection.poArea.Left

.

        loSelected.Top = Selection.poArea.Top

.

        loSelected.Right = Selection.poArea.Right

.

        loSelected.Bottom = Selection.poArea.Bottom

.

        InvertRect(hdc.ToInt32, loSelected)

.

With the enum beepType you get intellisense when you type "beep." and you can then select the kind of beep you want. For dylan.NET, use the fields containing the integer values inside the WinSnd class of dnu.dll at http://dylandotnetapps.codeplex.com/

.

        Select Case MsgWaitForMultipleObjects(1, arrHandles, 1, waitInterval, QS_ALLEVENTS)

.

        End Select

.

        Select Case MsgWaitForMultipleObjects(1, arrHandles, 1, waitInterval, QS_ALLEVENTS)

.

        End Select

.

            // New power scheme selected.

.

const uint EVENT_OBJECT_SELECTION = 0x8006; // hwnd ID idChild is selected item (if only one), or idChild is OBJID_WINDOW if complex

.

const uint EVENT_OBJECT_SELECTIONADD = 0x8007; // hwnd ID idChild is item added

.

const uint EVENT_OBJECT_SELECTIONREMOVE = 0x8008; // hwnd ID idChild is item removed

.

const uint EVENT_OBJECT_SELECTIONWITHIN = 0x8009; // hwnd ID idChild is parent of changed selected items

.

const uint EVENT_OBJECT_TEXTSELECTIONCHANGED = 0x8014; // hwnd ID idChild is item w? test selection change

.

Now you can use the font info however you want. Here's how to return a GDI+ Font corresponding to the MessageBox font selected by the user. Note that the height is always negative and always returns "world" units.

.

        Select Case m.Msg

.

        End Select

.

            oldBitmap = Win32.SelectObject(memDc, hBitmap);

.

                Win32.SelectObject(memDc, oldBitmap);

.

        public extern static IntPtr SelectObject(IntPtr hDC, IntPtr hObject);

.

Public Const VK_SELECT = &H29

.

    public const uint VK_SELECT = 0x29;

.

    public const uint VK_LAUNCH_MEDIA_SELECT = 0xB5;

.

      foreach(var culture in (new string[]{"he-IL", "en-US", "en-IE"}).Select(code => CultureInfo.GetCultureInfo(code)))

.

      foreach(var culture in (new string[]{"he-IL", "en-US", "en-IE"}).Select(code => CultureInfo.GetCultureInfo(code)))

Enums

.

   // Add a search item to the list of completed strings. Selecting this item launches a search engine.

.

   // Use the TAB key to select an item from the drop-down list.

.

    /// If the user selects folders that are not part of the file system,

.

    /// If the user selects an ancestor of the root folder that is not part of the file system, the OK button is grayed

.

    /// When the selected item is a shortcut, return the PIDL of the shortcut itself rather than its target.

.

    /// Only return computers. If the user selects anything other than a computer, the OK button is grayed.

.

    /// Only allow the selection of printers. If the user selects anything other than a printer, the OK button is grayed

.

    ''' If the user selects an ancestor of the root folder that is not part of the file system, the OK button is grayed

.

    ''' When the selected item is a shortcut, return the PIDL of the shortcut itself rather than its target.

.

    ''' Only return computers. If the user selects anything other than a computer, the OK button is grayed.

.

    ''' Only allow the selection of printers. If the user selects anything other than a printer, the OK button is grayed

.

    internal static PropertyKey UI_PKEY_SelectedItem = new PropertyKey(new Guid(Convert.ToString(104, 16).PadLeft(8, '0') + UI_PropertyKey), (int)VarEnum.VT_UI4);

58: DLGC
.

    /// <summary> Windows will send an EM_SETSEL message to the control to select its contents. </summary>

59: DM
.

/// Selects duplex or double-sided printing for printers capable of duplex printing.

60: DMDUP
.

/// Selects duplex or double-sided printing for printers capable of duplex printing.

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: