Click here to Skip to main content
15,918,193 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Having in assiue whereby I am copying the content of a label to an external program. Using the:

VB
clipboard.settext(lblOutput)


to copy the label text, and Ctrl + V to paste. I think the problem is that the external program is quite old (possible originally mad in VB6). I can't update the program.

It works fine if I copy to a word document then to the target program.

The output just contains squares instead of new lines.

Thanks in advance.
Posted

1 solution

Probably, the problem is that the old program is expecting ASCII style text, while the new one is Unicode.
Try using the other overload:
VB
Clipboard.SetText(lblOutput.Text, TextDataFormat.Text)
Which will enforce the format.
 
Share this answer
 

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