2 lw931012 lw931012 于 2014.05.18 14:05 提问

SysInfoStrings的用法

protected override void OnPaint(PaintEventArgs pea)
{
Graphics grfx = pea.Graphics;
Brush brush = new SolidBrush(ForeColor);
int iCount = SysInfoStrings.Count;
string[] astrLabels = SysInfoStrings.Labels;
string[] astrValues = SysInfoStrings.Values;

    for (int i = 0; i < iCount; i++)
    {
        grfx.DrawString(astrLabels[i], Font, brush,
                                        0, i * cySpace);
        grfx.DrawString(astrValues[i], Font, brush,
                                        cxCol, i * cySpace);
    }
Csdn user default icon
上传中...
上传图片
插入图片