错误“类型'DataGridView'未定义".在DataGridViewPrinter类中 [英] Error "Type 'DataGridView' not defined" in the DataGridViewPrinter Class

查看:107
本文介绍了错误“类型'DataGridView'未定义".在DataGridViewPrinter类中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在vb.net环境中是新手,因为我曾经在c#中进行编码.我已经将DataGridViewPrinter类复制到我的项目中,因为我想打印我的datagridview的内容,但是现在出现一条错误提示:

下一行中的未定义类型"DataGridView"":

I''m new in the vb.net environment as I''m used to coding in c#. I''ve copied the DataGridViewPrinter class to my project as I want to print the contents of my datagridview but I now get an error stating :

"Type ''DataGridView'' is not defined" in the line below:

Private TheDataGridView As DataGridView


有人可以帮忙吗?我要在明天下午之前完成.

预先谢谢您.


Can someone please help? I need to finish this by tomorrow Afternoon.

Thank you in advance.

推荐答案

瑞安

是的,我确实有,但没有帮助.还有其他建议吗?
Hi Ryan

Yes I do have it and it''s not helping. Any other suggestion?


尝试并完全限定它.
昏暗的打印机=新的system.windows.forms.DataGridViewPrinterHelper
try and fully qualify it.
Dim Printer = New system.windows.forms.DataGridViewPrinterHelper


您是否具有以下导入功能?
Do you have the following import?
Imports System.Data


这篇关于错误“类型'DataGridView'未定义".在DataGridViewPrinter类中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆