question

KenMcGrath-0307 avatar image
0 Votes"
KenMcGrath-0307 asked KenMcGrath-7215 commented

Can't paste open source code into program

I'm new to program. I'm attempting to write a program in C# to communicate with an Arduino mega rev R3. I've made some success. There is open source code that I am trying to paste to no avail. I don't understand why the text editor won't allow me to do this. Will some please help me with this problem.
P.S. I tried to copy it to word but, word will not allow me to paste it.
Thank you for any help.

dotnet-csharp
· 17
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You're going to have to be more specific about what programs you are using and where you are copying from and to. Maybe share a screen snapshot.

Can you type characters into both windows?

If you open up 2 copies of notepad can you type characters into one of them, and then copy and paste the text into the other?

1 Vote 1 ·

Hi,

I would like to check if the reply could be of help? If yes, please help accept answer, so that others meet a similar issue can find useful information quickly. If you have any other concerns or questions, please feel free to feedback.

Best Regards,
Joan

0 Votes 0 ·

I'm using vs C sharp. The website I'm copying the code from is below:

https://www.codeproject.com/Articles/1199389/TextBox-with-a-Keyboard-and-Mouse-UI

The website's name is code project and it allows you to copy.

0 Votes 0 ·

I'm using vs C sharp. The website I'm copying the code from is below:

https://www.codeproject.com/Articles/1199389/TextBox-with-a-Keyboard-and-Mouse-UI

The website's name is code project and it allows you to copy.

0 Votes 0 ·

I'm sorry, but you are still not being specific enough about where you are copying from and to.

I copied some code from the site and pasted it into notepad. If you have a Visual Studio project open and you can successfully type into whatever code window that you have open, then I see no reason why you cannot copy and paste this code.

From looking at the site, I would think that what you want is the entire project.

https://www.codeproject.com/KB/miscctrl/1199389/TestKeysAndWheelProject.zip


91836-capture.jpg




0 Votes 0 ·
capture.jpg (100.0 KiB)

I was copying and trying to paste. I was copying from the website and trying to Pace the code in 2 C sharp

0 Votes 0 ·

I tried copying into notepad and word to no avail.

0 Votes 0 ·
Show more comments

I thought that I explained it well. And I don't understand your question as I said in the beginning I'm new to this.

0 Votes 0 ·

Please don't be insulting I don't want the entire project.

0 Votes 0 ·
Show more comments

I can copy the code and paste it into the program.

0 Votes 0 ·
Show more comments
SSengupta-4080 avatar image
0 Votes"
SSengupta-4080 answered

May be a license issue is restricting...

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

jiayaozhu-MSFT avatar image
0 Votes"
jiayaozhu-MSFT answered

Hi,

Thank you for your posting!

Firstly, I agree with what @SSengupta-4080 said, it may be a license issue.

Actually, pasting open source code into your own program is a longtime debate and this practice can be prohibited in some cases. The source where you tried to copy and paste code may be implemented strict copyright protection and that's why your text editor did not allow you to do this.

Here is an article for why should not pasting open source code to your program:

https://resources.whitesourcesoftware.com/blog-whitesource/copy-and-paste-code

Thank you for your understanding and support!

BR,
Joan


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

KenMcGrath-7215 avatar image
0 Votes"
KenMcGrath-7215 answered MotoX80 commented

I discovered what I was doing wrong. I would copy the code from my phone and email it to myself and then try to copy and paste it into C sharp. When I open the website "code project" on my computer I was able to copy and paste the code. I appreciate everyone's help. Once again thank you.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Please note my comment from 5 days ago.

92424-capture.jpg


0 Votes 0 ·
capture.jpg (19.1 KiB)