Desktop Functions: Smart Device Functions:
|
Search Results for "DISPLAY" in [All]setupapiDIBCI_NODISPLAYCLASS // Exclude a class if it has the NoDisplayClass value entry in its registry key.
const uint DIBCI_NODISPLAYCLASS = 0x00000002; msdrmshell32Consider 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.
/// 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; 8: ShellAbout 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. 11: SHGetFileInfo
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. 12: SHGetImageList 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.
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 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)
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
/// A screen saver is displayed, the machine is locked, rasapi3219: RasDial 20: RasDialDlg mqrt
//Something else went wrong. Display error, and then exit.
//Something else went wrong. Display error, and then exit. ole3222: CLIPFORMAT
CF_OWNERDISPLAY = 0x80, 23: CoGetObject
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); 25: OleCreate
/// Show the property page. Some property pages cannot be displayed wtsapi3226: WTSSendMessage 27: WTS_INFO_CLASS
WTSClientDisplay = 15,
WTSClientDisplay = 15 advapi3229: CreateService
string lpDisplayName,
ByVal displayName As String, ByVal desiredAccess As Int32, ByVal serviceType As Int32, _
Dim displayName As String = "AAATestDisplayName"
Dim serviceHandle As IntPtr = CreateService(scHandle, serviceName, displayName, SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, _
internal string pDisplayName;
static extern bool LookupPrivilegeDisplayName(
System.Text.StringBuilder displayName, // out
ref uint cbDisplayName,
Declare Function LookupPrivilegeDisplayName Lib "advapi32.dll" (TODO) As TODO This is one of those "call twice" functions, so this error is just daily life. When it returns with this error, the byte count (cbDisplayName) will be set to what you need. Call EnsureCapacity on your StringBuilder and go round again.
// Use the service name and *NOT* the display name.
string serviceName = "Dnscache"; // Display name is "DNS Client"
// Use the service name and *NOT* the display name.
string serviceName = "Dnscache"; // Display name is "DNS Client" netapi32
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)); imm3235: ImmConfigureIME ntdsapi36: DsCrackNames
// display name is not necessarily the defining RDN.
DS_DISPLAY_NAME = 3, Structures37: BROWSEINFO
public IntPtr pszDisplayName;
<MarshalAs(UnmanagedType.LPTStr)>Public pszDisplayName As String
pszDisplayName As String 38: CAPTUREPARMS
/// User-initiated capture flag. If this member is TRUE, AVICap displays a dialog box prompting
''' User-initiated capture flag. If this member is TRUE, AVICap displays a dialog box prompting 40: DESKBANDINFO
/// The band object is displayed with a sunken appearance.
/// The band will be displayed with the background color specified in crBkgnd. 41: DEVMODE
public Int32 dmDisplayOrientation;
public Int32 dmDisplayFixedOutput;
public Int32 dmDisplayFlags;
public Int32 dmDisplayFrequency;
Public dmDisplayFlags As Integer
Public dmDisplayFrequency As Integer Since the DEVMODE members beyond dmDisplayFrequency do not have to be declared, the structure can vary in size. You should set dmSize to effective size of your implemetation before calling API functions:
public Int32 dmDisplayOrientation;
public Int32 dmDisplayFixedOutput;
public Int32 dmDisplayFlags;
public Int32 dmDisplayFrequency; 42: DISPLAY
public struct DISPLAY_DEVICE
public DisplayDeviceStateFlags StateFlags;
Public Structure DISPLAY_DEVICE
Public StateFlags As DisplayDeviceStateFlags Used with EnumDisplayDevices 43: DISPLAY_DEVICE
public struct DISPLAY_DEVICE
public DisplayDeviceStateFlags StateFlags;
Public Structure DISPLAY_DEVICE
Public StateFlags As DisplayDeviceStateFlags Used with EnumDisplayDevices
public string pDisplayName;
EnableMultiBatteryDisplay = 0x02,
EnableVideoDimDisplay = 0x10,
EnableMultiBatteryDisplay = &H2
EnableVideoDimDisplay = &H10
public string lpDisplayName; 47: INSTALLERINFO
[MarshalAs(UnmanagedType.LPTStr)] public string pDisplayName;
Public pDisplayName As String pDisplayName: a string that supplies the display name of an application that is associated with a driver package. DIFxAPI requires an application display name to inform a user which application is associated with a driver package. For example, if a user clicks on the Remove button of an Add or Remove Programs entry that was created by the DIFx tools to represent a driver package, the resulting user dialog box will list the display names of the applications that are associated with the driver package. If a caller supplies an INSTALLERINFO structure that specifies an association between an application and a driver package, this member must not be NULL or supply an empty string. 48: MAPI
/// Pointer to the display name of the message recipient or sender.
''' Pointer to the display name of the message recipient or sender. 49: NETRESOURCE
public ResourceDisplayType dwDisplayType;
Public dwDisplayType As ResourceDisplayType ResourceScope, ResourceType, ResourceDisplayType, ResourceUsage 50: NET_DISPLAY_USER 51: OpenFileName
''' The first string is your display string that describes the custom filter,
''' When the user selects a file, nFilterIndex returns the index of the currently displayed 52: SHFILEINFO
public string szDisplayName;
Public szDisplayName As String szDisplayName Changed from Definition to Signature in order to display them in the PInvoke.net Visual Studio Add-In. 53: STRRET
public IntPtr pOleStr; // must be freed by caller of GetDisplayNameOf
<FieldOffset(4)> Public pOleStr As IntPtr 'must be freed by caller of GetDisplayNameOf
// Structure used to return the display name to
STRRET pDisplayName;
String DisplayName;
pDisplayName.uType = (uint)STRRET_TYPE.STRRET_CSTR;
// Get the "normal" display name.
iShellFolder.GetDisplayNameOf(pidlItems[0], SHGNO.SHGDN_NORMAL,
out pDisplayName);
System.Text.StringBuilder sbDisplayName = new System.Text.StringBuilder(256);
// Get the display name from the STRRET structure
WindowsAPI.StrRetToBuf(ref pDisplayName, pidlItems[0],
sbDisplayName, (uint)sbDisplayName.Capacity);
DisplayName = sbDisplayName.ToString(); difxapi
installerInfo.pDisplayName = "My Package";
installerInfo.pDisplayName = "My Package"
installerInfo.pDisplayName = "My Package";
installerInfo.pDisplayName = "My Package" coredll
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) 58: ExtEscape 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. 59: GetDC 60: SetSysColors
/// 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. Cut off search results after 60. Please refine your search. |