零件在vb.net中绘制
本文关键字:vb net 绘制 零件 | 更新日期: 2023-09-27 18:27:39
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.