Public Declare PtrSafe Function CloseClipboard Lib "user32" () As Long Public Declare PtrSafe Function GetClipboardData Lib "user32" (ByVal wFormat As Long) As LongPtr 'Correct wFormat type is integer or long? Public Declare PtrSafe Function OpenClipboard Lib "user32" (ByVal hwnd As LongPtr) As Long Public Declare PtrSafe Function IsClipboardFormatAvailable Lib "user32" (ByVal wFormat As Long) As Long '* fnOLEError Get the error text for an OLE error code '* CreatePicture Private function to convert a bitmap or metafile handle to an OLE reference '* PastePicture The entry point for the routine '* to paste a picture of whatever is on the clipboard into a standard image control. '* Set Image1.Picture = PastePicture(xlPicture) '* The code in this module has been derived from a number of sources '* The code requires a reference to the "OLE Automation" type library '* the picture type - xlBitmap or xlPicture. The PastePicture function takes an optional argument of '* This object can then be assigned to (for example) and Image control '* DESCRIPTION: Creates a standard Picture object from whatever is on the clipboard. '* AUTHOR
0 Comments
Leave a Reply. |