Desktop Functions: Smart Device Functions:
|
Search Results for "DISPLAY" in [All]misc1: Comments Discovered DISPLAY_DEVICE struct defined with CharSet=CharSet.Ansi. Works much better on Win7 with CharSet=CharSet.Auto. Suspect this is also true of a number of other structs and Win7 predecessors.
user32
static extern DISP_CHANGE ChangeDisplaySettingsEx(string lpszDeviceName, ref DEVMODE lpDevMode, IntPtr hwnd, ChangeDisplaySettingsFlags dwflags, IntPtr lParam);
Private Shared Function ChangeDisplaySettingsEx(ByVal lpszDeviceName As String, ByRef lpDevMode As DEVMODE, ByVal hwnd As IntPtr, ByVal dwflags As UInteger, ByVal lParam As IntPtr) As DISP_CHANGE See also ChangeDisplaySettings
DISPLAY_DEVICE d = new DISPLAY_DEVICE();
int deviceID=1; // This is only for my device setting. Go through the whole EnumDisplayDevices to find your device
EnumDisplayDevices(null,deviceID, ref d, 0); //
EnumDisplaySettings(d.DeviceName, 0, ref dm);
ChangeDisplaySettingsEx(d.DeviceName, ref dm, IntPtr.Zero, CDS_UPDATEREGISTRY, IntPtr.Zero);
/// <param name="lpWindowName">Pointer to a null-terminated string that specifies the window name. If the window style specifies a title bar, the window title pointed to by lpWindowName is displayed in the title bar. When using CreateWindow to create controls, such as buttons, check boxes, and static controls, use lpWindowName to specify the text of the control. When creating a static control with the SS_ICON style, use lpWindowName to specify the icon name or identifier. To specify an identifier, use the syntax "#num". </param>
''' <param name="lpWindowName">Pointer to a null-terminated string that specifies the window name. If the window style specifies a title bar, the window title pointed to by lpWindowName is displayed in the title bar. When using CreateWindow to create controls, such as buttons, check boxes, and static controls, use lpWindowName to specify the text of the control. When creating a static control with the SS_ICON style, use lpWindowName to specify the icon name or identifier. To specify an identifier, use the syntax "#num". </param>
///<Summary>Displays the window.</Summary>
'''<Summary>Displays the window.</Summary>
//Displays the id and name of the all the different data formats currently in the clipboard.
static extern bool EnumDisplayDevices(string lpDevice, uint iDevNum, ref DISPLAY_DEVICE lpDisplayDevice, uint dwFlags);
<DllImport("user32.dll", EntryPoint:="EnumDisplayDevices", CharSet:=CharSet.Auto, CallingConvention:=CallingConvention.StdCall)> _
Public Shared Function EnumDisplayDevices(ByVal lpDevice As String, ByVal iDevNum As UInteger, ByRef lpDisplayDevice As DISPLAY_DEVICE, ByVal dwFlags As UInteger) As Integer
DISPLAY_DEVICE d=new DISPLAY_DEVICE();
for (uint id=0; EnumDisplayDevices(null, id, ref d, 0); id++) {
Dim dispDev1 As New DISPLAY_DEVICE
While (EnumDisplayDevices(vbNullString, i, dispDev1, &H0))
EnumDisplayDevices(vbNullString, i, dispDev1, &H0)
EnumDisplayDevices(dispDev1.DeviceName, 0, dispDev1, &H1)
static extern bool EnumDisplayMonitors(IntPtr hdc, IntPtr lprcClip,
Private Shared Function EnumDisplayMonitors(ByVal hdc As IntPtr, ByVal lprcClip As IntPtr, ByVal lpfnEnum As EnumMonitorsDelegate, ByVal dwData As IntPtr) As Boolean
/// The struct that contains the display information
public class DisplayInfo
/// Collection of display information
public class DisplayInfoCollection : List<DisplayInfo>
/// Returns the number of Displays using the Win32 functions
/// <returns>collection of Display Info</returns>
public DisplayInfoCollection GetDisplays()
DisplayInfoCollection col = new DisplayInfoCollection();
EnumDisplayMonitors( IntPtr.Zero, IntPtr.Zero,
DisplayInfo di = new DisplayInfo(); Use System.Windows.Forms.Screen.AllScreens to get an array of all displays on the system.
static extern bool EnumDisplaySettingsEx(string lpszDeviceName, int iModeNum, ref DEVMODE lpDevMode, uint dwFlags);
Private Shared Function EnumDisplaySettingsEx(ByVal lpszDeviceName As String, ByVal iModeNum As UInteger, ByRef lpDevMode As DEVMODE, ByVal dwFlags As UInteger) As Boolean See also: EnumDisplaySettings
static extern bool EnumDisplaySettingsEx(string lpszDeviceName, uint iModeNum, out DEVMODE lpDevMode, uint dwFlags);
Private Shared Function EnumDisplaySettingsEx(ByVal lpszDeviceName As String, ByVal iModeNum As UInteger, ByRef lpDevMode As DEVMODE, ByVal dwFlags As UInteger) As Boolean See also: EnumDisplaySettings
//Displays the id and name of the all the different data formats currently in the clipboard. 14: GetDC Retrieves a handle to a display device context (DC) for the client area of a specified window or for the entire screen. Unless the display DC belongs to a window class, the ReleaseDC function must be called to release the DC after painting. Also, ReleaseDC must be called from the same thread that called GetDCEx. The number of DCs is limited only by available memory. Unless the display DC belongs to a window class, the ReleaseDC function must be called to release the DC after painting. Also, ReleaseDC must be called from the same thread that called GetDCEx. The number of "DCs" is limited only by available memory. 15: GetDCEx Retrieves a handle to a display device context (DC) for the client area of a specified window or for the entire screen. Unless the display DC belongs to a window class, the ReleaseDC function must be called to release the DC after painting. Also, ReleaseDC must be called from the same thread that called GetDCEx. The number of DCs is limited only by available memory. Unless the display DC belongs to a window class, the ReleaseDC function must be called to release the DC after painting. Also, ReleaseDC must be called from the same thread that called GetDCEx. The number of "DCs" is limited only by available memory. 16: GetMonitorInfo internal static extern bool EnumDisplayMonitors(IntPtr hdc, IntPtr lprcClip, MonitorEnumProc lpfnEnum, IntPtr dwData);
EnumDisplayMonitors(IntPtr.Zero, IntPtr.Zero, MonitorEnumCallBack, IntPtr.Zero);
public const int GMMP_USE_DISPLAY_POINTS = 1;
uint mode = GMMP_USE_DISPLAY_POINTS; 18: GetSystemMetrics * System metrics may vary from display to display. Most values are returned in number of pixels, all others are flag or boolean values. * GetSystemMetrics(SM_CMONITORS) counts only display monitors. This is different from EnumDisplayMonitors, which enumerates display monitors and also non-display pseudo-monitors. The following example creates a new ListView control, and displays each member of the enumerator and it's return value. To use this example, paste it into the code (not the deigner code) file of a blank form. (ie, Form1.cs), if you have AIPCC installed you wont need to use the WindowsAPI class, instead it will be imported fron the AIP class library. 19: IsWindow
/// WS_VISIBLE[0x10000000L] is set, the window is displayed and subsequent drawing into it is displayed as long as the
/// not be displayed if the window is obscured by other windows or is clipped by its parent window. 20: MessageBox The language for the text displayed in the message box button(s). Specifying a value of zero (0) indicates to display the button text in the default system language. If this parameter is MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), the current language associated with the calling thread is used.
private Shared Function DisplayMessageBox( _
Public Function DisplayMessageBox( _
DisplayMessageBox = MessageBoxTimeOut(hWnd, Message, Caption, MessageBoxOptions, 0, TimeOutMilliseconds) 21: MONITORINFO The MONITORINFOEX structure contains information about a display monitor. The MONITORINFOEX structure is a superset of the MONITORINFO structure. The MONITORINFOEX structure adds a string member to contain a name for the display monitor.
/// The MONITORINFOEX structure contains information about a display monitor.
/// for the display monitor.
/// A RECT structure that specifies the display monitor rectangle, expressed in virtual-screen coordinates.
/// Note that if the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative values.
/// A RECT structure that specifies the work area rectangle of the display monitor that can be used by applications,
/// Note that if the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative values.
/// The attributes of the display monitor.
/// A string that specifies the device name of the monitor being used. Most applications have no use for a display monitor name, 22: MONITORINFOEX The MONITORINFOEX structure contains information about a display monitor. The MONITORINFOEX structure is a superset of the MONITORINFO structure. The MONITORINFOEX structure adds a string member to contain a name for the display monitor.
/// The MONITORINFOEX structure contains information about a display monitor.
/// for the display monitor.
/// A RECT structure that specifies the display monitor rectangle, expressed in virtual-screen coordinates.
/// Note that if the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative values.
/// A RECT structure that specifies the work area rectangle of the display monitor that can be used by applications,
/// Note that if the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative values.
/// The attributes of the display monitor.
/// A string that specifies the device name of the monitor being used. Most applications have no use for a display monitor name,
static extern bool SetWindowDisplayAffinity(IntPtr hwnd, DisplayAffinity affinity);
Declare Function SetWindowDisplayAffinity Lib "user32.dll" (hwnd As IntPtr, affinity As DisplayAffinity) As Boolean
enum DisplayAffinity : uint 26: SetWindowPos
/// <term>SWP_SHOWWINDOW (0x0040)</term><description>Displays the window.</description>
/// Displays the window. 27: SetWindowText
/// 0x09). Tab characters are displayed as vertical bar(|) characters.<br />For an example go to 28: ShowCursor The ShowCursor function displays or hides the cursor.
[in] Specifies whether the internal display counter is to be incremented or decremented. If bShow is TRUE, the display count is incremented by one. If bShow is FALSE, the display count is decremented by one. 29: ShowScrollBar In the TextBox's Change event handler, use the PictureBox's TextHeight function to see how tall the text is. If the text is too big to fit in the TextBox, we need to display the scrollbar. If the need for the scrollbar has changed, use the ShowScrollBar API function to show or hide it. 31: WinHelpCommands
///<Summary>Display topic in ulTopic</Summary>
///<Summary>Display index</Summary>
///<Summary>Display help on using help</Summary>
///<Summary>Display topic for keyword in offabData</Summary>
'''<Summary>Display topic in ulTopic</Summary>
'''<Summary>Display index</Summary>
'''<Summary>Display help on using help</Summary>
'''<Summary>Display topic for keyword in offabData</Summary> setupapiDIBCI_NODISPLAYCLASS // Exclude a class if it has the NoDisplayClass value entry in its registry key.
const uint DIBCI_NODISPLAYCLASS = 0x00000002; mpr
public ResourceDisplayType dwDisplayType = 0;
public enum ResourceDisplayType
RESOURCEDISPLAYTYPE_GENERIC,
RESOURCEDISPLAYTYPE_DOMAIN,
RESOURCEDISPLAYTYPE_SERVER,
RESOURCEDISPLAYTYPE_SHARE,
RESOURCEDISPLAYTYPE_FILE,
RESOURCEDISPLAYTYPE_GROUP,
RESOURCEDISPLAYTYPE_NETWORK,
RESOURCEDISPLAYTYPE_ROOT,
RESOURCEDISPLAYTYPE_SHAREADMIN,
RESOURCEDISPLAYTYPE_DIRECTORY,
RESOURCEDISPLAYTYPE_TREE,
RESOURCEDISPLAYTYPE_NDSCONTAINER nr.dwDisplayType = ResourceDisplayType.RESOURCEDISPLAYTYPE_SHARE;
// public enum ResourceDisplayType
// RESOURCEDISPLAYTYPE_GENERIC,
// RESOURCEDISPLAYTYPE_DOMAIN,
// RESOURCEDISPLAYTYPE_SERVER,
// RESOURCEDISPLAYTYPE_SHARE,
// RESOURCEDISPLAYTYPE_FILE,
// RESOURCEDISPLAYTYPE_GROUP,
// RESOURCEDISPLAYTYPE_NETWORK,
// RESOURCEDISPLAYTYPE_ROOT,
// RESOURCEDISPLAYTYPE_SHAREADMIN,
// RESOURCEDISPLAYTYPE_DIRECTORY,
// RESOURCEDISPLAYTYPE_TREE,
// RESOURCEDISPLAYTYPE_NDSCONTAINER
// public ResourceDisplayType dwDisplayType = 0;
myNetResource.dwDisplayType = 3;
DisplayType = ResourceDisplaytype.Share,
public ResourceDisplaytype DisplayType; public enum ResourceDisplaytype : int
public enum ResourceDisplayType
RESOURCEDISPLAYTYPE_GENERIC,
RESOURCEDISPLAYTYPE_DOMAIN,
RESOURCEDISPLAYTYPE_SERVER,
RESOURCEDISPLAYTYPE_SHARE,
RESOURCEDISPLAYTYPE_FILE,
RESOURCEDISPLAYTYPE_GROUP,
RESOURCEDISPLAYTYPE_NETWORK,
RESOURCEDISPLAYTYPE_ROOT,
RESOURCEDISPLAYTYPE_SHAREADMIN,
RESOURCEDISPLAYTYPE_DIRECTORY,
RESOURCEDISPLAYTYPE_TREE,
RESOURCEDISPLAYTYPE_NDSCONTAINER
public ResourceDisplayType dwDisplayType = 0;
myResource.dwDisplayType = 3 35: WNetEnumResource
public enum RESOURCE_DISPLAYTYPE
RESOURCEDISPLAYTYPE_GENERIC= 0x00000000,
RESOURCEDISPLAYTYPE_DOMAIN= 0x00000001,
RESOURCEDISPLAYTYPE_SERVER= 0x00000002,
RESOURCEDISPLAYTYPE_SHARE= 0x00000003,
RESOURCEDISPLAYTYPE_FILE = 0x00000004,
RESOURCEDISPLAYTYPE_GROUP= 0x00000005,
RESOURCEDISPLAYTYPE_NETWORK= 0x00000006,
RESOURCEDISPLAYTYPE_ROOT = 0x00000007,
RESOURCEDISPLAYTYPE_SHAREADMIN = 0x00000008,
RESOURCEDISPLAYTYPE_DIRECTORY = 0x00000009,
RESOURCEDISPLAYTYPE_TREE = 0x0000000A,
RESOURCEDISPLAYTYPE_NDSCONTAINER = 0x0000000B
public RESOURCE_DISPLAYTYPE dwDisplayType;
nr.dwDisplayType.ToString(), nr.lpLocalName, nr.lpRemoteName );
Public Enum RESOURCE_DISPLAYTYPE
RESOURCEDISPLAYTYPE_GENERIC = &H0
RESOURCEDISPLAYTYPE_DOMAIN = &H1
RESOURCEDISPLAYTYPE_SERVER = &H2
RESOURCEDISPLAYTYPE_SHARE = &H3
RESOURCEDISPLAYTYPE_FILE = &H4
RESOURCEDISPLAYTYPE_GROUP = &H5
RESOURCEDISPLAYTYPE_NETWORK = &H6
RESOURCEDISPLAYTYPE_ROOT = &H7
RESOURCEDISPLAYTYPE_SHAREADMIN = &H8
RESOURCEDISPLAYTYPE_DIRECTORY = &H9
RESOURCEDISPLAYTYPE_TREE = &HA
RESOURCEDISPLAYTYPE_NDSCONTAINER = &HB
Public dwDisplayType As RESOURCE_DISPLAYTYPE
Private Sub DisplayUncPath(ByVal aLocalPath As String)
public enum ResourceDisplayType
public ResourceDisplayType dwDisplayType = 0; aygshell38: SHFullScreen Hide the Start button icon on the navigation bar. When the Start icon is hidden, the shell is in a special state in which clicking or tapping the navigation bar will not display the drop-down Start menu. The navigation bar is essentially disabled when in this state. While in this mode, WM_LBUTTONDOWN and WM_LBUTTONUP messages will be forwarded to hwndRequester. This allows an application to drop out of this mode by calling this function with the SHFS_SHOWSTARTICON, when the user clicks or taps the navigation bar. 39: SHSipPreference A request to display the input panel. Any pending SIP_DOWN requests are ignored. 40: SndGetSound
Private szDisplayNameNative as String 41: SndSetSound
Private szDisplayNameNative as String ole3242: CLIPFORMAT
CF_OWNERDISPLAY = 0x80, 43: 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); 45: OleCreate
/// Show the property page. Some property pages cannot be displayed ntdsapi46: DsCrackNames
// display name is not necessarily the defining RDN.
DS_DISPLAY_NAME = 3, wtsapi3247: WTSSendMessage 48: WTS_INFO_CLASS
WTSClientDisplay = 15,
WTSClientDisplay = 15 wininet49: InternetConnect An application that needs to display multiline text information sent by an FTP server can use InternetGetLastResponseInfo to retrieve the text. Structures50: BROWSEINFO
public IntPtr pszDisplayName;
<MarshalAs(UnmanagedType.LPTStr)>Public pszDisplayName As String
pszDisplayName As String 51: 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 53: DESKBANDINFO
/// The band object is displayed with a sunken appearance.
/// The band will be displayed with the background color specified in crBkgnd. 54: 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; 55: DISPLAY
public struct DISPLAY_DEVICE
public DisplayDeviceStateFlags StateFlags;
Public Structure DISPLAY_DEVICE
Public StateFlags As DisplayDeviceStateFlags Used with EnumDisplayDevices 56: 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; 60: 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. Cut off search results after 60. Please refine your search. |