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に変換するのは簡単です。