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]

ws2_32

.

    public static extern int select(

.

Declare Function select Lib "ws2_32.dll" (TODO) As TODO

.
Documentation
[select] on MSDN

gdi32

.

static extern IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj);

.

    IntPtr pOrig = SelectObject(pSource, bmp.GetHbitmap(Color.Black));

.

    IntPtr pNew = SelectObject(pSource, pOrig);

.

Use SelectObject to select a source image into the source DC before trying to BitBlt it.

.

static extern IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj);

.

    IntPtr pOrig = SelectObject(pSource, bmp.GetHbitmap());

.

    IntPtr pOrig = SelectObject(pDC, hbitmap);

.

    // select the pen into the device context

.

    IntPtr oldpen = SelectObject(pDC, pen);

.

    // select the old pen back

.

    DeleteObject(SelectObject(pDC, oldpen));

.

    SelectObject(pDC, pOrig);

.

///   <para>If the specified handle is not valid or is currently selected into a DC, the return value is zero.</para>

.

///   <para>Do not delete a drawing object (pen or brush) while it is still selected into a DC.</para>

.

            List<string> mono = (from f in allFonts where ((f.LogFont.elfLogFont.lfPitchAndFamily & 0x3) == (int)GdiFonts.FontPitch.FIXED_PITCH) & (GdiFonts.FontLanguageCharSet)f.LogFont.elfLogFont.lfCharSet == GdiFonts.FontLanguageCharSet.ANSI_CHARSET select f.LogFont.elfFullName).ToList<string>();

.

            List<string> variable = (from f in allFonts where ((f.LogFont.elfLogFont.lfPitchAndFamily & 0x3) == (int)GdiFonts.FontPitch.VARIABLE_PITCH) & (GdiFonts.FontLanguageCharSet)f.LogFont.elfLogFont.lfCharSet == GdiFonts.FontLanguageCharSet.ANSI_CHARSET select f.LogFont.elfFullName).ToList<string>();

.

            List<string> mono = (from f in allFonts where ((f.LogFont.elfLogFont.lfPitchAndFamily & 0x3) == (int)GdiFonts.FontPitch.FIXED_PITCH) & (GdiFonts.FontLanguageCharSet)f.LogFont.elfLogFont.lfCharSet == GdiFonts.FontLanguageCharSet.ANSI_CHARSET select f.LogFont.elfFullName).ToList<string>();

.

            List<string> variable = (from f in allFonts where ((f.LogFont.elfLogFont.lfPitchAndFamily & 0x3) == (int)GdiFonts.FontPitch.VARIABLE_PITCH) & (GdiFonts.FontLanguageCharSet)f.LogFont.elfLogFont.lfCharSet == GdiFonts.FontLanguageCharSet.ANSI_CHARSET select f.LogFont.elfFullName).ToList<string>();

.

public static extern IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj);

.

    IntPtr vPreviouseBrush = SelectObject(vDC, vBrush);

.

    SelectObject(vDC, vPreviouseBrush);

.

/// The ABC spaces are measured along the character base line of the selected font.

.

/// The ABC widths of the default character are used for characters outside the range of the currently selected

.

     IntPtr hObjOld = SelectObject(hDC, hFont);

.

     SelectObject(hDC, hObjOld);

.

        IntPtr OldFont = SelectObject(this.DC, this.Font);

.

        SelectObject(this.DC, OldFont);

.

As a prerequisite a font handle has to be loaded into the device context using the SelectObject method in gdi32.dll.

.

    /// Selects the graphics object (here a font handle) into the device context.

.

    /// <param name="hgdiobj">A handle to the object to be selected.

.

    /// <returns>If the selected object is not a region and the function succeeds, the return value is a handle to the object being replaced.

.

    /// If an error occurs and the selected object is not a region, the return value is NULL. Otherwise, it is HGDI_ERROR.</returns>

.

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

.

    ///  Use <see cref="SelectObject"/> for loading the font into a device context.</param>

.

        // Read selector (always = 0) to advance reader position by 2 bytes

.

        ushort selector = ToLittleEndian(br.ReadUInt16());

.

            SelectObject(hdc, fontHandle);

.

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

.

        IntPtr old = SelectObject(hdc, hFont);

.

        SelectObject(hdc, old);

.

                    IntPtr prev = SelectObject(hdc, font.ToHfont());                    

.

    IntPtr oldfnt = GDI.SelectObject(hdc, font.ToHfont());

.

    GDI.DeleteObject(GDI.SelectObject(hdc, oldfnt));

.

    IntPtr oldfnt = GDI.SelectObject(hdc, font.ToHfont());

.

    GDI.DeleteObject(GDI.SelectObject(hdc, oldfnt));

.

//CharSet.auto automatically selects between these functions based on the OS version:

.

     IntPtr hFontPreviouse = SelectObject(hDC, hFont);

.

     SelectObject(hDC, hFontPreviouse);

.

static extern IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj);

.

      IntPtr hFontPrevious = Win32::SelectObject(hDC, hFont);

.

      Win32::SelectObject(hDC, hFontPrevious);

17: LineTo
.

    IntPtr pOrig = SelectObject(pDC, hbitmap);

.

    // select the pen into the device context

.

    IntPtr oldpen = SelectObject(pDC, pen);

.

    // select the old pen back

.

    DeleteObject(SelectObject(pDC, oldpen));

.

    SelectObject(pDC, pOrig);

.

    IntPtr pOrig = SelectObject(pDC, hbitmap);

.

    // select the pen into the device context

.

    IntPtr oldpen = SelectObject(pDC, pen);

.

    // select the old pen back

.

    DeleteObject(SelectObject(pDC, oldpen));

.

    SelectObject(pDC, pOrig);

.

    public static extern IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj);

.

        IntPtr oldPen = GDI32.SelectObject(hDC, thePen);

.

        IntPtr oldBrush = GDI32.SelectObject(hDC, theBrush);        

.

        GDI32.SelectObject(hDC, oldPen);

.

        GDI32.SelectObject(hDC, oldBrush);            

.
Summary
.

static extern int SelectClipRgn(IntPtr hdc, IntPtr hrgn);

.

SelectClipRgn(hdc, hRegion); // region will be copied

.

SelectClipRgn(hdc, IntPtr.Zero); // reset clip region

.
Documentation
[SelectClipRgn] on MSDN
.
Summary
Selects an object into the specified device context (DC). The new object replaces the previous object of the same type.
.

/// <summary>Selects an object into the specified device context (DC). The new object replaces the previous object of the same type.</summary>

.

/// <param name="hgdiobj">A handle to the object to be selected.</param>

.

///   <para>If the selected object is not a region and the function succeeds, the return value is a handle to the object being replaced. If the selected object is a region and the function succeeds, the return value is one of the following values.</para>

.

///   <para>If an error occurs and the selected object is not a region, the return value is <c>NULL</c>. Otherwise, it is <c>HGDI_ERROR</c>.</para>

.

///   <para>This function returns the previously selected object of the specified type. An application should always replace a new object with the original, default object after it has finished drawing with the new object.</para>

.

///   <para>An application cannot select a single bitmap into more than one DC at a time.</para>

.

///   <para>ICM: If the object being selected is a brush or a pen, color management is performed.</para>

.

[DllImport("gdi32.dll", EntryPoint = "SelectObject")]

.

public static extern IntPtr SelectObject([In] IntPtr hdc, [In] IntPtr hgdiobj);

.

Public Shared Function SelectObject(ByVal hdc As IntPtr, ByVal hObject As IntPtr) As IntPtr

.

Public Declare Function SelectObject Lib "gdi32.dll" _

.
Documentation
[SelectObject] on MSDN
.
Summary
.

static extern IntPtr SelectPalette(IntPtr hdc, IntPtr hpal,

.
Documentation
[SelectPalette] on MSDN
.

    public static extern int SelectObject(IntPtr hDC, int hGdiObject);

.

// Create a red pen and select it into the device context.

.

int hOldPen = SelectObject(hDC, hPen);

.

// Create a null brush and select it into the device context.

.

int hOldBrush = SelectObject(hDC, hBrush);

.

SelectObject(hDC, hOldPen);

.

SelectObject(hDC, hOldBrush);

.

                IntPtr pOrig = SelectObject(pSource, hbmp);

.

                IntPtr pNew = SelectObject(pSource, pOrig);

.

        static extern IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj);

.

[CharSet = CharSet.Auto] According to my experience this parameter should be used when using a LOGFONT structure and the CreateFontIndirect fuction, otherwise the selected font will not be displayed. All flags will be done (lfItalic, lfUnderline ...) but not the lfFaceName string.

.

   public static extern IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj);

.

       //a color that you set through SelectObject the .net garbage collector will

.

    //We have to use SelectObject to set the font, color and other properties.

.

    IntPtr last_font = SelectObject(HDC, Font.ToHfont());

.

        DeleteObject(SelectObject(HDC, last_font));

.

    Private Shared Function SelectObject(ByVal hdc As IntPtr, ByVal hgdiobj As IntPtr) As IntPtr

.

            FontPtr = SelectObject(Hdc, myFont.ToHfont())

misc

.

I need to use this call to permit the user to browse the network neighborhood and select a specific computer system, and the .Net implementation of the wrapper for this does not seem to support the BIG_BROWSEFORCOMPUTER option! If anyone has figured this out, could they please post the information to this web site and let me know at MAILTO:kendrhyd@sympatico.ca? Thanks.

.
  • Have a page that lets you select one or more signatures and have it generate a C# or VB file that contains those signatures.
.

One thing that I would like to see is a page that lets you select one or more signatures and have it generate a C# file that contains those signatures. -- jeff@consultutah.com

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.

wininet

.

    dwZone = cmbZone1.SelectedIndex

.

    dwParty = cmbParty1.SelectedIndex

.

    dwZone = cmbZone2.SelectedIndex

.

    dwParty = cmbParty2.SelectedIndex

.

    sTmp = cmbSetTemplate.SelectedItem

winmm

.

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

iphlpapi

.

                     select thisAddress).FirstOrDefault();

.

                          select thisInterface).SingleOrDefault();

.

                          select thisInterface).SingleOrDefault();

.

        Return String.Join(":", (From z As Byte In mac.GetAddressBytes Select z.ToString("X2")).ToArray())

.

        Return String.Join(":", (From z As Byte In mac.GetAddressBytes Select z.ToString("x2")).ToArray())

Structures

.
Summary
Contains parameters for the SHBrowseForFolder function and receives information about the folder selected by the user.
.

    ILD_SELECTED = 0x00000004,

.

        ///SELECT key

.

        SELECT = 0x29,

.

        ///Windows 2000/XP: Select Media key

.

        LAUNCH_MEDIA_SELECT = 0xB5,

.

        SELECT = 0,

.

        LAUNCH_MEDIA_SELECT = 109,

38: MAPI
.

    /// Client applications can select message types for their non-IPM messages.

.

    ''' Client applications can select message types for their non-IPM messages.

.

     SINGLESELECT   =(MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_SINGLE | MIXERCONTROL_CT_UNITS_BOOLEAN),

.

     MUX        =(SINGLESELECT + 1),

.

     MULTIPLESELECT =(MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_MULTIPLE | MIXERCONTROL_CT_UNITS_BOOLEAN),

.

     MIXER      =(MULTIPLESELECT + 1),

.

    ''' and the second string is the filter pattern selected by the user.

.

    ''' When the user selects a file, the dialog box copies the current filter pattern

.

    ''' The index of the currently selected filter in the File Types control.

.

    ''' When the user selects a file, nFilterIndex returns the index of the currently displayed

.

    ''' selected file.

.

    ''' The file name and extension (without path information) of the selected file. This member can be NULL.

.

    ''' The initial directory. The algorithm for selecting the initial directory varies on different platforms.

.

    ''' If the user selects more than one file, nFileOffset is the offset to the first file name.

.

    public uint     otmfsSelection;

.

        Public otmfsSelection As UInt32

.

        public uint DeviceNotSelectedTimeout;

43: TVITEM
.

  public int iSelectedImage;

.

  public int iSelectedImage;

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.

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


 
Access PInvoke.net directly from VS: