Toon posts:

[VB.NET] Clipboard probleem

Pagina: 1
Acties:
  • 38 views sinds 30-01-2008

Verwijderd

Topicstarter
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:
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?

  • gorgi_19
  • Registratie: Mei 2002
  • Laatst online: 15:50

gorgi_19

Kruimeltjes zijn weer op :9

Het is een Nederlands forum hier, dus kan je hem ook wel in het Nederlands vertalen :)

Digitaal onderwijsmateriaal, leermateriaal voor hbo


Dit topic is gesloten.