vb.net中PartPainted(c#)的等效过程或功能或代码是什么?这是c#中代码的示例片段,但是当我将其转换为vb.net代码时,不知道PartPainted函数。
if (PartPainted(paintParts, DataGridViewPaintParts.ContentForeground))
外观与从DataGridView控件文章“构建自定义NumericUpDown单元和列”示例中的代码非常相似:
// If the cell is in editing mode, there is nothing else to paint
if (!cellEdited)
{
if (PartPainted(paintParts, DataGridViewPaintParts.ContentForeground))
{
// Paint a NumericUpDown control
// Take the borders into account
如果是这样,那么它不是框架/内置函数-只是同一类中的另一个方法:
/// <summary>
/// Little utility function called by the Paint function to see if a particular part needs to be painted.
/// </summary>
private static bool PartPainted(DataGridViewPaintParts paintParts, DataGridViewPaintParts paintPart)
{
return (paintParts & paintPart) != 0;
}
转换为VB应该不容易。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句