富文本扩展类 [英] Rich text extended class
问题描述
知识库文章
https://support.microsoft.com/en-us/help/811401/how-to-print-the-content-of- a-richtextbox-control-by-using-visual-basi
包括这两条指令(测试控件,7和8)
- 在工具菜单上,点击自定义工具箱。
- 点击 .NET Framework组件,点击
浏览,点击选择
RichTextBoxPrintCtrl.dll ,然后点击
确定。
I我正在使用VS2010并且我的安装中不存在菜单项。
如何将扩展控件放入我的工具箱?
您好GrahamJS,
欢迎到MSDN论坛。
什么是你的VS 2010版本?
我尝试按照"测试"下的使用VS 2010专业人员共享的文档进行操作控件'部分和步骤7似乎提供了错误的路径,请转到
工具箱并在任何地方右键单击,选择"选择项目... ",然后按照步骤8手动添加此自定义控件'RichTextBoxPrintCtrl',如下所示:
之后,按照其余步骤测试此控件,但还有另一个我们需要修改的地方,代码如下:
< span style ="font-size:11.0pt; FONT-FAMILY:"宋体",无衬线;颜色:#333333">示例:
私人
Sub btnPageSetup_Click( ByVal sender
As System。 Object ,
ByVal e 作为系统。 EventArgs )
句柄 btnPageSetup.Click。 点击
PageSetupDialog1.ShowDialog()
< p style ="text-autospace:none"> 结束
Sub
我们需要:
私人
Sub btnPageSetup_Click( ByVal sender
As System。 Object ,
ByVal e 作为系统。 EventArgs )
句柄 btnPageSetup.Click
PageSetupDialog1.ShowDialog()
< p style ="text-autospace:none"> 结束
Sub
最后,它应该像以下一样正常工作:
最好的问候,
萨拉跨度>
The KB article
https://support.microsoft.com/en-us/help/811401/how-to-print-the-content-of-a-richtextbox-control-by-using-visual-basi
includes these two instructions (Test the control , 7 and 8)
- On the Tools menu, click Customize Toolbox.
- Click .NET Framework Components, click
Browse, click to select
RichTextBoxPrintCtrl.dll, and then click
OK.
I am using VS2010 and the menu item does not exist on my installation.
How do I get the extended control into my toolbox?
Hi GrahamJS,
Welcome to the MSDN forum.
What’s your VS 2010 version?
I tried to follow the document that your shared using the VS 2010 professional, under ‘Test the control’ part and the step 7 seems provide a wrong path, please go to Toolbox and right click at any place, select ‘Choose Items…’, then follow the step 8 to manual add this customized control ‘RichTextBoxPrintCtrl’ like the following:
After that, follow the remaining steps to test this control, but there has another place that we need to modify, the code as below:
The example:
Private Sub btnPageSetup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPageSetup.Click.Click
PageSetupDialog1.ShowDialog()
End Sub
We need:
Private Sub btnPageSetup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPageSetup.Click
PageSetupDialog1.ShowDialog()
End Sub
Finally, it should work fine like the following:
Best regards,
Sara
这篇关于富文本扩展类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!