Ik zit met een heel frustrerend probleem en kan er verder nergens wat over vinden, ik heb deze post ook op een engelstalig site geplaatst dus ik plak 'm even. Ik zit met m'n handen in het haar, is jullie onderstaand probleem bekend?
---------------------
I have a problem with a function which opens a PDF file, makes a screenshot and copy it to clipboard. When i call the function from a clickevent or on pageload, everything is ok.
Now when i call the function from a FileSystemEventArgs event (which watches a folder live) my function goes wrong when checking if clipboard data is present:
It's very odd, when i crtl+v in Paint, it shows me the right screenshot but when i run through the code it stops here:
because it sais there is NOTHING...
How is it possible that it is under my ctrl+v but sees nothing on the clipboard??
(and again: onclick or onload, the function went perfect and the clipboarddata is present)
please help?
---------------------
I have a problem with a function which opens a PDF file, makes a screenshot and copy it to clipboard. When i call the function from a clickevent or on pageload, everything is ok.
Now when i call the function from a FileSystemEventArgs event (which watches a folder live) my function goes wrong when checking if clipboard data is present:
code:
1
2
3
4
| Call pdfPage.CopyToClipboard(pdfRect, 0, 0, 100) Dim clipboardData As IDataObject = Clipboard.GetDataObject() If (clipboardData.GetDataPresent(DataFormats.Bitmap)) Then... |
It's very odd, when i crtl+v in Paint, it shows me the right screenshot but when i run through the code it stops here:
code:
1
| clipboardData.GetDataPresent(DataFormats.Bitmap) |
because it sais there is NOTHING...
How is it possible that it is under my ctrl+v but sees nothing on the clipboard??
(and again: onclick or onload, the function went perfect and the clipboarddata is present)
please help?