图片可以剪切板到image里吗? 100送

解决方案 »

  1.   

    对,但是要先判断,是否为图象格式
    Indicates whether the clipboard contains data in a specified format.procedure HasFormat(Format: Word): Boolean;DescriptionUse HasFormat to find out whether the clipboard contains data encoded in a specific format. HasFormat returns True if the format is present and False otherwise. TClipboard keeps a list of available formats in the Formats array property.Some of the possible values of the Format parameter follow. HasFormat supports additional formats provided by Windows or by other applications as well as custom formats registered with TPicture.RegisterClipboardFormat.Value MeaningCF_TEXT Text with a CR-LF combination at the end of each line. A null character identifies the end of the text.
    CF_BITMAP A Windows bitmap graphic.
    CF_METAFILEPICT A Windows metafile graphic.
    CF_PICTURE An object of type TPicture.
    CF_COMPONENT Any persistent object.然后用assign。对了要加uses clipbrd;
      

  2.   

    Clipboard.Assign(Image.Picture);