从标签复制到其他程序 [英] Copying from Label to other Program
本文介绍了从标签复制到其他程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以借此将标签的内容复制到外部程序.使用:
Having in assiue whereby I am copying the content of a label to an external program. Using the:
clipboard.settext(lblOutput)
复制标签文本,然后按Ctrl + V粘贴.我认为问题在于外部程序相当老(可能最初在VB6中很疯狂).我无法更新程序.
如果我复制到Word文档然后复制到目标程序,则效果很好.
输出仅包含正方形而不是换行.
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.
推荐答案
可能是这样的,问题是旧程序需要ASCII样式的文本,而新程序需要Unicode的文本.
尝试使用其他重载:
Probably, the problem is that the old program is expecting ASCII style text, while the new one is Unicode.
Try using the other overload:
Clipboard.SetText(lblOutput.Text, TextDataFormat.Text)
这将强制执行该格式.
这篇关于从标签复制到其他程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文