C# Class WinLib.WinAPI.User32

Datei anzeigen Open project: SortByte/Network-Manager

Public Methods

Method Description
LoadIconFromExe ( string file, int nIconIndex, int size ) : Icon

Needs to be implemeted so higher resolution icons can be extracted, unlike ExtractIconEx which can only extract 32x32. This can be done with LoadImage, but resource ID is required, so we must enumarate ICON resources first, then map them to a 0 based index

Private Methods

Method Description
CreateWindowEx ( uint dwExStyle, string lpClassName, string lpWindowName, uint dwStyle, int x, int y, int nWidth, int nHeight, IntPtr hWndParent, IntPtr hMenu, IntPtr hInstance, IntPtr LPVOIDlpParam ) : IntPtr
DestroyWindow ( IntPtr hWnd ) : bool
GetUpdateRect ( IntPtr hWnd, System.Windows.Forms.RECT &rect, bool bErase ) : bool
LoadImage ( IntPtr hinst, string szName, uint uType, int cxDesired, int cyDesired, uint fuLoad ) : IntPtr
PostMessage ( IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam ) : int
ReleaseCapture ( ) : bool
SendMessage ( IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam ) : int
WindowFromPoint ( System.Windows.Forms.POINT Point ) : IntPtr

Method Details

LoadIconFromExe() public static method

Needs to be implemeted so higher resolution icons can be extracted, unlike ExtractIconEx which can only extract 32x32. This can be done with LoadImage, but resource ID is required, so we must enumarate ICON resources first, then map them to a 0 based index
public static LoadIconFromExe ( string file, int nIconIndex, int size ) : Icon
file string
nIconIndex int
size int
return System.Drawing.Icon