LoadPicture("a.bmp") 將剪貼簿中文字取到 變數temp中 Dim temp As String If Clipboard.GetFormat(CF_TEXT) Then Temp = Clipboard.GetText(CF_TEXT)"CF_TEXT = 1 將剪貼簿中圖片貼上到當前窗體 If Clipboard.GetFormat(CF_BITMAP) Then Picture = Clipboard.GetData()"CF_BITMAP = 2 CF_LINK &HBF00 dde conversation information CF_TEXT 1 Text CF_BITMAP 2 Bitmap (
.BMP
files) CF_METAFILE 3 Metafile (
.wmf
files) CF_DIB 8 Device-independent bitmap CF_PALETTE 9 Color palette
vb提供了物件Clipboard完成剪貼簿的操作 將文字複製到剪貼簿
Clipboard.Clear
Clipboard.SetText
"text" 將bmp圖片複製到剪貼簿Clipboard.Clear
Clipboard.SetData
LoadPicture("a.bmp") 將剪貼簿中文字取到 變數temp中 Dim temp As String If Clipboard.GetFormat(CF_TEXT) Then Temp = Clipboard.GetText(CF_TEXT)"CF_TEXT = 1 將剪貼簿中圖片貼上到當前窗體 If Clipboard.GetFormat(CF_BITMAP) Then Picture = Clipboard.GetData()"CF_BITMAP = 2 CF_LINK &HBF00 dde conversation information CF_TEXT 1 Text CF_BITMAP 2 Bitmap (.BMP
files) CF_METAFILE 3 Metafile (.wmf
files) CF_DIB 8 Device-independent bitmap CF_PALETTE 9 Color palette