Storing screen shot of a form to bitmap file
HICON CopyIcon(
HICON hIcon
);
DECLARE INTEGER CopyIcon IN user32 INTEGER hIcon
hIcon [in] Handle to the icon to be copied.
If the function succeeds, the return value is a handle to the duplicate icon.
The CopyIcon function enables an application or dynamic-link library (DLL) to get its own handle to an icon owned by another module. If the other module is freed, the application icon will still be able to use the icon.
Before closing, an application must call the DestroyIcon function to free any system resources associated with the icon.