For example, if you copy the buffer from IE looks one at a time, and if you copy something from a page through Chrome, then the HTML in the buffer will look different => you may need to process it differently due to browser features.

Simply, the program should get into the buffer and pull out the Html from there, and then process it.

  • one
    What does copying from IE and copying from a page mean? - Grundy
  • Plain insert or extended? The copying side can support several insert formats. CF_TEXT is the simplest format, but some RTF support has others. - nick_n_a
  • @Grundy, missed the word Chrome - iluxa1810
  • @nick_n_a, insertion does not matter. I use pens to take data from the buffer in Html format and do the processing. - iluxa1810
  • one
    @ iluxa1810 Then I suggest digging in the direction of the OS facilities (Win32 API, for example) - eastwing

1 answer 1

You can try as follows:

static bool CopiedFromIE() { return Clipboard.ContainsData("msSourceUrl"); }