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
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "DISPLAY" in [All]

netapi32

.
Summary
The NetQueryDisplayInformation function returns user account, computer, or group account information. Call this function to quickly enumerate account information for display in user interfaces.
.

       extern static uint NetQueryDisplayInformation([MarshalAs(UnmanagedType.LPWStr)]

.

    Declare Function NetQueryDisplayInformation Lib "Netapi32.dll"

.

    Declare Function NetQueryDisplayInformation Lib "Netapi32.dll" _

.

lret = NetQueryDisplayInformation(strDomain, 3, lindex, 100, MAX_PREFERRED_LENGTH, out lread , out x);

.

        NET_DISPLAY_USER usr = new NET_DISPLAY_USER();

.

        int StructSize = Marshal.SizeOf(typeof(NET_DISPLAY_USER));

.

        lret = NetQueryDisplayInformation(DomainController, 1, lindex, reqRecs, MAX_PREFERRED_LENGTH, out lread, out UsrBuf);

.

                usr = (NET_DISPLAY_USER)Marshal.PtrToStructure(item, typeof(NET_DISPLAY_USER));

.

    public struct NET_DISPLAY_USER

.

    public    struct NET_DISPLAY_GROUP

.

    public struct NET_DISPLAY_MACHINE

.

    [DllImport("Netapi32.dll")]    static extern int NetQueryDisplayInformation([MarshalAs(UnmanagedType.LPWStr)] string serverName,

.

    NET_DISPLAY_GROUP grp = new NET_DISPLAY_GROUP ();

.

    NET_DISPLAY_USER usr = new NET_DISPLAY_USER();

.

        lret = NetQueryDisplayInformation(strDomain, 3, lindex, 1, 1024, out lread , out x);

.

                grp = (NET_DISPLAY_GROUP)Marshal.PtrToStructure (x, typeof(NET_DISPLAY_GROUP));

.

        lret = NetQueryDisplayInformation(strDomain, 1, lindex, 1, 1024, out lread , out x);

.

                usr = (NET_DISPLAY_USER)Marshal.PtrToStructure(x, typeof(NET_DISPLAY_USER));

.

    NET_DISPLAY_MACHINE mac = new NET_DISPLAY_MACHINE ();

.

        lret = NetQueryDisplayInformation(strDomain, 2, lindex, 1, 1024, out lread , out x);

.

                mac = (NET_DISPLAY_MACHINE) Marshal.PtrToStructure(x,typeof(NET_DISPLAY_MACHINE));

.
Documentation
[NetQueryDisplayInformation] on MSDN

shell32

.

Consider a Winform application with a OpenFileDialog that helps pick some file. This is then passed to the ExtractAssociatedIcon method to get the icon and display in a picture box.

.
Summary
Extends the ITaskbarList interface by exposing a method to mark a window as a full-screen display.
.

    /// Activates an item on the taskbar. The window is not actually activated; the window's item on the taskbar is merely displayed as active.

.

    /// <param name="hWnd">A handle to the window on the taskbar to be displayed as active.</param>

.

    /// Displays or updates a progress bar hosted in a taskbar button to show the specific percentage

.

    /// Sets the type and state of the progress indicator displayed on a taskbar button.

.

    /// shown. This window's associated taskbar button will display the progress bar.</param>

.

    /// Informs the taskbar that a new tab or document thumbnail has been provided for display in an

.

    /// order in which they are displayed left to right, will be their permanent order.</param>

.

    /// Specifies or updates the text of the tooltip that is displayed when the mouse pointer rests on an

.

    /// <param name="hWnd">The handle to the window whose thumbnail displays the tooltip. This handle must

.

    /// <param name="pszTip">The pointer to the text to be displayed in the tooltip. This value can be NULL,

.

    /// Selects a portion of a window's client area to display as that window's thumbnail in the taskbar.

.

    /// in place and return to the default display of the thumbnail, set this parameter to NULL.</param>

.

        GetDisplayName (

.

        MessageBox.Show ( "GetDisplayName(), PIDL count > 1" );

.

                ShellFolder.GetDisplayNameOf(

.

    string GetParsableDisplayName ( IntPtr lpifq )  

.

                GetDisplayName (

.

    void ParseDisplayName(

.

        String pszDisplayName,

.

    void GetDisplayNameOf(

.

        private uint BIF_BROWSEINCLUDEURLS  = 0x0080;   // Allow URLs to be displayed or entered. (Requires BIF_USENEWUI)

.

        private uint BIF_SHAREABLE      = 0x8000;  // sharable resources displayed (remote shares, requires BIF_USENEWUI)

.

          // Note that the BROWSEINFO object's pszDisplayName only gives you the name of the folder.

.

            public string pszDisplayName;

.
Summary
.

With the above code (VB), I have had problems on Win 7 x64. By changing the build type to x86 in the advanced compile options, the code works... (Specifically, on Win7 x64, ShellExecuteEx returned NO error, but the file's property page was not displayed)

.

        //     No dialog box confirming the deletion of the objects will be displayed.

.

        //     No dialog box indicating the progress will be displayed.

.

     public string szDisplayName;

.

For a whole winform sample of Displayname see http://Dzaebel.NET/ShGetFileInfo.htm

.

        szDisplayName="";

.

      public string szDisplayName;

.

      /// <summary>get display name</summary>

.

      DisplayName      = 0x000000200,

.

        public string szDisplayName;

.

Please note also that it returns a 32x32 icon with the default (lowest) resolution, which is resized by Windows if you display it as 16x16, the result being that it looks horrible.

.

The image size is normally 32x32 pixels. However, if the Use large icons option is selected from the Effects section of the Appearance tab in Display Properties, the image is 48x48 pixels.

.
Summary
.

    DISPLAYATTRMASK = &HFC000

.

    DISPLAYNAME = &H200

.

    NORMALDISPLAY = 0

.

    <System.Runtime.InteropServices.DllImportAttribute("shell32.dll", EntryPoint:="SHParseDisplayName")> _

.

    Private Shared Function SHParseDisplayName( _

.

       displayType As SIGDN) As String

.

        SHGetNameFromIDList(pidl, displayType, ptr)

.

        SHParseDisplayName(parseName, IntPtr.Zero, ptr, 0, 0)

.

    'Example = Get Display Name for 'My Computer'

.

    Public Function ComputerDisplayName() As String

.

        Dim displayName As String = GetNameFromPIDL(ptrLoc, SIGDN.NORMALDISPLAY)

.

        Return displayName

.

   Optional ByRef DisplayName As String = "", _

.

                DisplayName = shi.Name

.

                DisplayName = fit2.Name

.

                    DisplayName = f2.Self.Name

.

                    DisplayName = folder2.Title

.

    public static extern void SHParseDisplayName([MarshalAs(UnmanagedType.LPWStr)] string name, IntPtr bindingContext, [Out] out IntPtr pidl, uint sfgaoIn, [Out] out uint psfgaoOut);

.

        SHParseDisplayName(folderPath, IntPtr.Zero, out nativeFolder, 0, out psfgaoOut);

.

        SHParseDisplayName(Path.Combine(folderPath, file), IntPtr.Zero, out nativeFile, 0, out psfgaoOut);

.

    If SafeNativeMethods.SHParseDisplayName(folderPath, IntPtr.Zero, pidlFolder, 0, 0) = 0 Then

.

    If SafeNativeMethods.SHParseDisplayName(Path.Combine(_folderPath, fileName), IntPtr.Zero, pidl, 0, 0) = 0 Then

.

    Public Shared Function SHParseDisplayName(<MarshalAs(UnmanagedType.LPWStr)> ByVal pszName As String, ByVal pbc As IntPtr, ByRef ppidl As IntPtr, ByVal sfgaoIn As UInteger, ByRef psfgaoOut As UInteger) As Integer

.
Summary
Translates a Shell namespace object's display name into an item identifier list and returns the attributes of the object. This function is the preferred method to convert a string to a pointer to an item identifier list (PIDL).
.

public static extern void SHParseDisplayName( [MarshalAs(UnmanagedType.LPWStr)] string name, IntPtr bindingContext,[Out()] out IntPtr pidl, uint sfgaoIn, [Out()] out uint psfgaoOut);

.

Private Shared Sub SHParseDisplayName(<MarshalAs(UnmanagedType.LPWStr)> ByVal name As String, ByVal bindingContext As IntPtr, <Out()> ByRef pidl As IntPtr, ByVal sfgaoIn As UInt32, <Out()> ByRef sfgaoOut As UInt32)

.
Documentation
SHParseDisplayName @msdn on MSDN
.
Summary
Translates a Shell namespace object's display name into an item identifier list and returns the attributes of the object. This function is the preferred method to convert a string to a pointer to an item identifier list (PIDL).
.

static extern TODO SHParseDisplayName(TODO);

.

Declare Function SHParseDisplayName Lib "shell32.dll" (ByVal pszName As Long, Optional ByVal pbc As Long, Optional ByRef ppidl As Long, Optional ByVal sfgaoIn As Long, Optional ByRef psfgaoOut As Long) As Long

.
Documentation
[SHParseDisplayName] on MSDN
.

        /// A screen saver is displayed, the machine is locked,

odbccp32

.

Using the value of this.Handle from within a Windows Forms application's form control will cause SQLConfigDataSource to display a dialog to the user that is pre-populated with the provided attribute values.

.

        /// <param name="hwndParent">Parent window handle. The function will not display

msports

.
Summary
SerialDisplayAdvancedSettings displays the system-supplied advanced settings dialog box for a specified COM port device.
.

static extern int SerialDisplayAdvancedSettings(IntPtr parentHwnd, IntPtr deviceInfoSet, ref SP_DEVINFO_DATA deviceInfoData);

.

Declare Function SerialDisplayAdvancedSettings Lib "msports.dll" (TODO) As TODO

.

            NativeMethods.SerialDisplayAdvancedSettings(IntPtr.Zero, deviceInfoSetHandle, ref deviceInfoData);

.
Documentation
[SerialDisplayAdvancedSettings] on MSDN

crypt32

.

    const uint CERT_NAME_SIMPLE_DISPLAY_TYPE    = 4;

.

    const uint CERT_NAME_FRIENDLY_DISPLAY_TYPE  = 5;

.

                        CERT_NAME_FRIENDLY_DISPLAY_TYPE,

.

                      CERT_NAME_SIMPLE_DISPLAY_TYPE, _

comdlg32

.
Summary
Display the Save File common dialog
.

    // printsettings are displayed in the print setup dialog.

hid

.

        DisplayException( MODULE_NAME, ex );

comctl32

.
Summary
Displays the drag image at the specified position within the window.
.

/// Displays the drag image at the specified position within the window.

.

/// <param name="x">X-coordinate at which to display the drag image.

.

/// <param name="y">Y-coordinate at which to display the drag image.

.

''' Displays the drag image at the specified position within the window.

.

''' <param name="x">X-coordinate at which to display the drag image.

.

''' <param name="y">Y-coordinate at which to display the drag image.

.

/// <param name="x">X-coordinate at which to display the drag image.

.

/// <param name="y">Y-coordinate at which to display the drag image.

.

''' <param name="x">X-coordinate at which to display the drag image.

.

''' <param name="y">Y-coordinate at which to display the drag image.

.

    /// <summary>The TaskDialogIndirect function creates, displays, and operates a task dialog. The task dialog contains application-defined icons, messages, title, verification check box, command links, push buttons, and radio buttons. This function can register a callback function to receive notification messages.</summary>

.

    /// <param name="taskConfig">A pointer to a <see cref="TaskDialogConfig"/> structure that contains information used to display the task dialog.</param>

.

   /// <summary>Indicates that the buttons specified in the pButtons member are to be displayed as command links (using a standard task dialog glyph) instead of push buttons. When using command links, all characters up to the first new line character in the pszButtonText member will be treated as the command link's main text, and the remainder will be treated as the command link's note. This flag is ignored if the cButtons member is zero.</summary>

.

   /// <summary>Indicates that the buttons specified in the pButtons member are to be displayed as command links (without a glyph) instead of push buttons. When using command links, all characters up to the first new line character in the pszButtonText member will be treated as the command link's main text, and the remainder will be treated as the command link's note. This flag is ignored if the cButtons member is zero.</summary>

.

   /// <summary>Indicates that the string specified by the pszExpandedInformation member is displayed at the bottom of the dialog's footer area instead of immediately after the dialog's content. This flag is ignored if the pszExpandedInformation member is NULL.</summary>

.

   /// <summary>Indicates that the string specified by the pszExpandedInformation member is displayed when the dialog is initially displayed. This flag is ignored if the pszExpandedInformation member is NULL.</summary>

.

   /// <summary>Indicates that the verification checkbox in the dialog is checked when the dialog is initially displayed. This flag is ignored if the pszVerificationText parameter is NULL.</summary>

.

   /// <summary>Indicates that a Progress Bar is to be displayed.</summary>

.

   /// <summary>Indicates that an Marquee Progress Bar is to be displayed.</summary>

.

   /// <summary>Indicates that text is displayed reading right to left.</summary>

ole32

.

    CF_OWNERDISPLAY = 0x80,

.
Summary
Converts a display name into a moniker that identifies the object named, and then binds to the object identified by the moniker.
.
Summary
.

static extern int MkParseDisplayName(UCOMIBindCtx pbc,

.

    /// <param name="szUserName">A pointer to the display name to be parsed.</param>

.

    int MkParseDisplayName(IBindCtx pbc, string szUserName, ref int pchEaten, out IMoniker ppmk);

.
Documentation
[MkParseDisplayName] on MSDN
.

        ///  Show the property page. Some property pages cannot be displayed

opengl32

.

        GLU_DISPLAY_MODE = 100204,

shlwapi

.
Summary
This interface describes the API implemented by preview handlers. When a handler for a given file type is installed on a system, the shell or custom apps can use it to display the contents of these files in their window. Preview handlers usually do not allow in-place editing and may not display all the information contained in the file (for example, macros inside Office documents are ignored by their preview handlers)
.

You can use this interface to leverage previewers already installed on a system to display a document preview in a Windows Forms app.

.

            // displays : "c:\a\very\very\long...\PathCompactpathEx"

.

            // displays : "c:\a\very\very\long...\PathCompactpathEx"

.

string sWin8ManifestString = "{C:\Program Files\WindowsApps\Microsoft.Video_6.2.8158.0_x86__8wekyb3d8bbwe\resources.pri?ms-resource://Microsoft.Video/resources/manifestVideoDisplayName}";

.
Summary
Displays a message box with a "Never show this dialog again" check box. This dialog is useful for displaying a one-time message to the user where they are likely never to want to see the dialog again.
.

/* The SHMessageBoxCheck() function is a Windows Shell API function that displays a custom messagebox with a "never ask me again" check box.  When the user checks the checkbox, the dialog never shows up again.  The shell API .dll exports this function by ordinal only.  The entrypoint  is ordinal 185 for ASCII and 191 for unicode. */

.

/* This code displays a dialog box with a "Don't show me this dialog again" checkbox and an OK button.  In normal circumstances, result will always be 0 on return. */

coredll

.
Summary
This function queries the user for notification settings by displaying a dialog box showing options that are valid for the current hardware platform.
.
Summary
Get/change the display rotation (landscape/portrait)
.

static extern int ChangeDisplaySettingsEx(string lpszDeviceName, ref DEVMODE lpDevMode, IntPtr hwnd, int dwflags, IntPtr lParam);

.

     public int dmDisplayFlags;

.

     public int dmDisplayFrequency;

.

     public int dmDisplayOrientation;

.

Declare Function ChangeDisplaySettingsEx Lib "coredll.dll" (ByVal lpszDeviceName As String, ByVal lpDevMode As Byte(), ByVal hwnd As IntPtr, ByVal dwflags As CDSFlags, ByVal lParam As IntPtr) As CDSRet

.

    DM_DISPLAYORIENTATION = 8388608

.

    DM_DISPLAYQUERYORIENTATION = 16777216

.

    ' Flags for ChangeDisplaySettings

.

    ' Return values for ChangeDisplaySettings

.

    static extern int ChangeDisplaySettingsEx(string lpszDeviceName,

.

        public int dmDisplayFlags;

.

        public int dmDisplayFrequency;

.

        public int dmDisplayOrientation;

.

        ChangeDisplaySettingsEx(null, ref DevM2, IntPtr.Zero, 2, IntPtr.Zero); // 2 = test

.

        MessageBox.Show("Supported: " + DevM2.dmDisplayOrientation.ToString());

.

        ChangeDisplaySettingsEx(null, ref devmode, IntPtr.Zero, 2, IntPtr.Zero); // 2 = test

.

        MessageBox.Show("Current: " + devmode.dmDisplayOrientation.ToString());

.

        devmode.dmDisplayOrientation = (devmode.dmDisplayOrientation == 0) ? 1 : 0; //switch between 0, 90 rotation

.

        ChangeDisplaySettingsEx(null, ref devmode, IntPtr.Zero, 0, IntPtr.Zero); // 0 = set

.

    Public Property dmDisplayFlags() As UInteger

.

    Public Property dmDisplayFrequency() As UInteger

.

    Public Property dmDisplayOrientation() As DMD

.

    Friend Shared Function ChangeDisplaySettingsEx(ByVal lpszDeviceName As String, ByVal lpDevMode As Byte(), ByVal hwnd As IntPtr, ByVal dwflags As CDSFlags, ByVal lParam As IntPtr) As CDSRet

.

        devMode.dmFields = DM_Fields.DM_DISPLAYORIENTATION

.

        devMode.dmDisplayOrientation = DMD.DMDO_0

.

        devMode.dmDisplayOrientation = DMD.DMDO_90

.

        devMode.dmDisplayOrientation = DMD.DMDO_180

.

        devMode.dmDisplayOrientation = DMD.DMDO_270

.

        Dim ret As CDSRet = ChangeDisplaySettingsEx(Nothing, devMode.Data, IntPtr.Zero, 0, IntPtr.Zero)

.
Documentation
[ChangeDisplaySettingsEx] on MSDN
.

Turn Off the Display While Running Applications

.

Applications like the Microsoft® Windows Media™ Player for Pocket PC allow the user to turn off the display while the application is running in the background. This article shows you how to do this with your own applications.

41: GetDC
.
Summary
This function retrieves a handle to a display device context (DC) for the client area of the specified window. The display device context can be used in subsequent graphics display interface (GDI) functions to draw in the client area of the window.
.

    /// 17 COLOR_GRAYTEXT Color of shaded text. This color is set to 0 if the current display driver does not support a solid gray color.

.

    /// 21 COLOR_3DDKSHADOW Color of the dark shadow for three-dimensional display elements.

.

    /// 22 COLOR_3DLIGHT Highlight color of three-dimensional display elements for edges that face the light source.

.

        /// <summary>Displays the window.</summary>

.
Summary
This function shows or hides the currently active input panel window. An application must call this function to display the input panel and its current input method (taken from msdn2.microsoft.com)
.
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.
.

    // Display a Pop Up menu at the bottom right corner of the working area of the screen

Enums

.

   // Use the UP ARROW and DOWN ARROW keys to display the autosuggest drop-down list.

.

    /// The browse dialog box can display URLs. The <bold>BIF_USENEWUI</bold> and <bold>BIF_BROWSEINCLUDEFILES</bold> flags must also be set.

.

    /// The browse dialog box displays files as well as folders.

.

    /// The browse dialog box can display shareable resources on remote systems.

.

    ''' The browse dialog box can display URLs. The <bold>BIF_USENEWUI</bold> and <bold>BIF_BROWSEINCLUDEFILES</bold> flags must also be set.

.

    ''' The browse dialog box displays files as well as folders.

.

    ''' The browse dialog box can display shareable resources on remote systems.

.

    /// <summary>Aligns the window's client area on a byte boundary (in the x direction). This style affects the width of the window and its horizontal placement on the display.</summary>

.

    /// <summary>Aligns the window on a byte boundary (in the x direction). This style affects the width of the window and its horizontal placement on the display.</summary>

.

    /// This style is useful for small windows (for example, menus or dialog boxes) that are displayed briefly and then removed before other screen activity takes place.

.

    /// This style increases the time required to display the window, because the system must first allocate memory to store the bitmap.

.

    ''' <summary>Aligns the window's client area on a byte boundary (in the x direction). This style affects the width of the window and its horizontal placement on the display.</summary>

.

    ''' <summary>Aligns the window on a byte boundary (in the x direction). This style affects the width of the window and its horizontal placement on the display.</summary>

.

    ''' This style is useful for small windows (for example, menus or dialog boxes) that are displayed briefly and then removed before other screen activity takes place.

.

    ''' This style increases the time required to display the window, because the system must first allocate memory to store the bitmap.

.

    /// The Save check box is displayed in the dialog box.

.

    /// The credential dialog box should be displayed on the secure desktop. This value cannot be combined with CREDUIWIN_GENERIC.

.

    ///<Summary>Displays the window.</Summary>

.

    '''<Summary>Displays the window.</Summary>

.

    /// The band object is displayed with a sunken appearance.

.

    /// The band will be displayed with the background color specified in crBkgnd.

.

    /// Displays a chevron when the toolbar requires overflow.

.

    /// Display the toolbar in a new break

.
Summary
Used with the DISPLAY_DEVICE structure.
.

public enum DisplayDeviceStateFlags : int

.

    /// <summary>The device is removable; it cannot be the primary display.</summary>

.

    /// <summary>The device has more display modes than its output devices support.</summary>

.

Enum DisplayDeviceStateFlags As Integer

.

    ''' <summary>The device is removable; it cannot be the primary display.</summary>

.

    ''' <summary>The device has more display modes than its output devices support.</summary>

.

See also DISPLAY_DEVICE

.
Documentation
[DisplayDeviceStateFlags] on MSDN
.
Summary
.

Used with ChangeDisplaySettings and ChangeDisplaySettingsEx

.

  // display name is not necessarily the defining RDN.

.

  DS_DISPLAY_NAME = 3,

.

    SHGFI_DISPLAYNAME = 0x000000200,     // get display name

.

    /// <summary>Alphanumeric display.</summary>

.

    ''' <summary>Alphanumeric display.</summary>

.

    ///Message is too long; some of it had to be truncated before displaying

.

    [Description("Message is too long; some of it had to be truncated before displaying")]

.

    '''Message is too long; some of it had to be truncated before displaying

.

    <Description("Message is too long; some of it had to be truncated before displaying")> _

.

/// Flags that define appearance and behaviour of a standard message box displayed by a call to the MessageBox function.

.

''' Flags that define appearance and behaviour of a standard message box displayed by a call to the MessageBox function.

.

    OF_PROMPT    = 0x00002000,  // Displays a dialog box if a requested file does not exist

.
Summary
The display options for the network object in a network browsing user interface. This member can be one of the following values defined in the Winnetwk.h header file.
.

private enum ResourceDisplayType : uint

.

Private Enum ResourceDisplayType As UInteger

.
Documentation
[ResourceDisplayType] on MSDN

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


 
Access PInvoke.net directly from VS: