#Define CF_BITMAP 2 #Define CF_DIB 8 #Define IMAGE_BITMAP 0 #Define LR_LOADFROMFILE 16 #Define LR_MONOCHROME 0x00000001 Local xpict m.xpict="E:\abc.tif" Local m.oo m.oo=Newobject("image") m.oo.Picture=m.xpict Local lnWidth,lnHeight lnWidth=m.oo.Width lnHeight=m.oo.Height nBitmap=0 hbm=0 GdipCreateBitmapFromFile(Strconv(m.xpict+0h00,5),@nBitmap) GdipCreateHBITMAPFromBitmap(nBitmap,@hbm,0) lhBmp = CopyImage(hbm, 0, m.lnWidth, m.lnHeight,0) If OpenClipboard(0)!= 0 EmptyClipboard() SetClipboardData(CF_BITMAP, lhBmp) CloseClipboard() Endif ENDPROC>Hi,
>> >>Declare Integer Sleep In kernel32 Integer >>Declare Integer OpenClipboard In User32 Integer >>Declare Integer CloseClipboard In User32 >>Declare Integer EmptyClipboard In User32 >>Declare Integer SetClipboardData In User32 Integer,Integer >>Declare Integer LoadImage In WIN32API Integer,String,Integer,Integer,Integer,Integer >>Declare Integer GetClipboardData In User32 Integer >>Declare Integer GdipCreateBitmapFromHBITMAP In GDIPlus.Dll Integer, Integer, Integer @ >>Declare Integer GdipSaveImageToFile In GDIPlus.Dll Integer,String,String @,String @ >>Declare Long GdipCreateHBITMAPFromBitmap In GDIPlus.Dll Long nativeImage, Long @, Long >>Declare Long GdipCreateBitmapFromFile In GDIPlus.Dll String FileName, Long @nBitmap >>Declare Long GdipCreateBitmapFromFile In GDIPlus.Dll String FileName, Long @nBitmap >>Declare Long CopyImage In WIN32API Long hImage, Long, Long, Long , Long >> >>#Define CF_BITMAP 2 >>#Define CF_DIB 8 >>#Define IMAGE_BITMAP 0 >>#Define LR_LOADFROMFILE 16 >>#Define LR_MONOCHROME 0x00000001 >> >>Local xpict >>m.xpict="E:\abc.tif" >> >>Local m.oo >>m.oo=Newobject("image") >>m.oo.Picture=m.xpict >>Local lnWidth,lnHeight >>lnWidth=m.oo.Width >>lnHeight=m.oo.Height >> >>nBitmap=0 >>hbm=0 >>GdipCreateBitmapFromFile(Strconv(m.xpict+0h00,5),@nBitmap) >>GdipCreateHBITMAPFromBitmap(nBitmap,@hbm,0) >>lhBmp = CopyImage(hbm, 0, m.lnWidth, m.lnHeight,0) >>If OpenClipboard(0)!= 0 >> EmptyClipboard() >> SetClipboardData(CF_BITMAP, lhBmp) >> CloseClipboard() >>Endif >>ENDPROC >>>>