Click here to Skip to main content
15,745,574 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi, there,

Do you know why, when I put an image in a button or in a picturebox I get this error (the 1st picture) and when I click ok I get this error (the second picture)?

Thanks

What I have tried:

First Error -
<a href="https://zupimages.net/up/23/21/tb0e.png">First Error</a>[<a href="https://zupimages.net/up/23/21/tb0e.png" target="_blank">^</a>]

The argument docData must implement the interface IVsTextStream


Second Error -
<a href="https://zupimages.net/up/23/21/m3i6.png">Second Error</a>[<a href="https://zupimages.net/up/23/21/m3i6.png" target="_blank">^</a>]

Unable to start Debugging. The startup project could not be launched. The operation was cancelled.
Posted
Updated 29-May-23 1:46am
v5
Comments
Richard MacCutchan 28-May-23 8:58am    
The error message is quite clear; you need to do what it tells you.
Member 15627495 28-May-23 9:26am    
Hi !

a better fix could be made, please copy paste the piece of code
Gerry Schmitz 28-May-23 10:38am    
https://stackoverflow.com/questions/34811682/the-argument-docdata-must-implement-the-interface-ivstextstream-error-after-impo

https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.textmanager.interop.ivstextstream?view=visualstudiosdk-2022
QuickSilvain 2023 30-May-23 8:56am    
Thanks for your help,

So I add a standard button, click on "image" in the property, a dialog box opens asking me if I want to save the changes to FMain.res. I click on save, another dialog box opens and I choose "Project resource file" and import my PNG image then I click on Ok and my image is displayed on the button.

I test by running the debugger and get the famous error message above.

I tried the same steps in a new project but it works fine, I don't get any error message for displaying an image in a button or a pictureBox.

The problem comes from my project

I tried that but no change
https://stackoverflow.com/questions/34811682/the-argument-docdata-must-implement-the-interface-ivstextstream-error-after-impo
Maciej Los 31-May-23 12:42pm    
Does the error occur while adding a picture from local drive?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900