我用Clipboard.SetData Picture1.Image, vbCFBitmap怎么不行,在文件夹中粘贴不了

解决方案 »

  1.   

    先复制一个标识符比如“CopyImage”,然后把图像保存成一个临时文件。
    在粘贴的文件夹里作判断,如果剪贴板的内容是“CopyImage”,就把那个临时文件拷屏过来。
    试试吧,乱想的.
      

  2.   

    Private Sub Form_Click ()
       Const CF_BITMAP = 2   ' 定义位图各种格式。
       Dim Msg   ' 声明变量。
       On Error Resume Next   ' 设置错误处理。
       Msg = "Choose OK to load a bitmap onto the Clipboard."
       MsgBox Msg   ' 显示信息。
       Clipboard.Clear   ' 清除剪贴板。
       Clipboard.SetData LoadPicture("PAPER.BMP")  ' 取得位图。
       If Err Then
          Msg = "Can't find the .bmp file."
          MsgBox Msg   ' 显示错误信息。
          Exit Sub
       End If
       Msg = "A bitmap is now on the Clipboard. Choose OK to copy "
       Msg = Msg & "the bitmap from the Clipboard to the form "
       MsgBox Msg   ' 显示信息。
       Picture = Clipboard.GetData()   ' 从剪贴板上复制。
       Msg = "Choose OK to clear the form."
       MsgBox Msg   ' 显示信息。
       Picture = LoadPicture()   ' 清除窗体。
    End Sub
      

  3.   

    我用Clipboard.SetData Picture1.Image, vbCFBitmap怎么不行,在文件夹中粘贴不了想在文件夹中粘贴的话(文件夹中粘贴的是文件,Clipboard.SetData Picture1.Image得到是图象信息,二者根本是两个问题),需要把Picture1.Image保存为临时文件,再把文件信息根据剪贴板格式送入剪贴板。