teesright.blogg.se

Msdn ipicture picturechanged
Msdn ipicture picturechanged













msdn ipicture picturechanged

Public Declare PtrSafe Function GetClipboardData Lib "user32" (ByVal wFormat As Long) As LongPtr 'Correct wFormat type is integer or long?

msdn ipicture picturechanged

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

#Msdn ipicture picturechanged code

'* 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

msdn ipicture picturechanged

'* 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 & DATE: STEPHEN BULLEN, Office Automation Ltd I'll appreciated it if anybody can give me a simple clue. I changed a little code and simplified it and below is the final one. So I used regsvr32 C:\windows\system32 oleaut32.dll in administrator mode and now succeeded but still can't get clipboard image to userform. ( image don't appear to userform image control)įirstly I doubt about the dll referencing because I can't manually add reference using tools > reference command in VBE. I did googling and found below sample code to load picture from current clipboard to userform but there is no change. I'm using 64bit office in 64bit window 10 PC.















Msdn ipicture picturechanged