GroupBox、背景画像としての PictureBox、および PowerPack からのいくつかのクリック可能な OvalShapes を備えた Windows フォーム アプリケーションがあります。
ここで、OvalShapes のラベルが必要なので、GroupBox に EventHandler を配置し、再描画のたびに次のように描画する必要があります。
this.groupBoxTest.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBoxVirtualView_Paint);
private void groupBoxVirtualView_Paint(object sender, PaintEventArgs e)
{
Graphics g = groupBoxVirtualView.CreateGraphics();//e.Graphics;
g.DrawString("01", new Font("Arial", 12), new SolidBrush(Color.Black), 240, 115);
}
しかし、文字列01
が描画されることはありません。私が見るのは、同じ位置にある楕円形だけです-テスト目的でそれらを無効にしても、それはできません。
私の弦に何が起こっているのですか?
PoweredOval にラベルを付ける他の方法はありますか?