本文介绍了什么样的俏皮方法是Paint? (DataGridViewImageCell.Paint(...))的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使程序停止并且点击停止调试后项目返回到设计模式,你能相信MessageBox可以显示吗?



我无法' t相信直到我尝试将执行MessageBox.Show(...)的命令插入到方法Paint(...)的主体中。



这是我的意思想知道何时调用此方法。我意识到每当重绘DataGridView时都会调用它,即使项目处于设计模式时也是如此。



你能解释一下它是如何工作的吗?据我所知,当某些事件发生时,将直接或间接调用该方法。但是我没有在属性窗口中看到任何与该方法相关联的事件,即使有一个事件(例如Paint事件),如何在所有调试或编译或运行停止时调用它?是的,如果你喜欢我,你不能继续设计和编码你的项目,因为每当包含datagridview的主窗体重新绘制或重新绘制名为Paint的playful方法时,它将显示一个消息框,单击OK按钮将重新重新绘制datagridview,并会出现一个新的消息框,这会产生一个调用Paint的循环。

是否有任何其他方法与该Paint相同?



非常感谢!

Can you believe the MessageBox can show even when the program stopped and the project returned to the design mode after clicking on "Stop debugging"?

I couldn't believe that until I tried inserting a command executing MessageBox.Show(...) into the body of the method Paint(...).

That's for I want to know when this method is called. I realized that it will be called whenever the DataGridView is redrawn, even when the project in design mode.

Could you please explain me how it works? As far as I know, the method will be called directly or indirectly when some event occurs. But I don't see any events associating with that method in the properties window, and even when there's one event for it (for example Paint event) how can it be called when all debugging or compiling or running stopped? Yes, if you do like me, you can't continue designing and coding your project because whenever the main form containing the datagridview with that "playful" method called Paint is redrawn or repainted, it will show a message box, clicking on the OK button will repaint the datagridview anew and a new message box will appear, that makes a loop of calling Paint.
Is there any other method of the same kind to that Paint?

Thank you so much!

推荐答案



这篇关于什么样的俏皮方法是Paint? (DataGridViewImageCell.Paint(...))的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 13:24
查看更多