私はこのカスタム コントロールに取り組んでいます。(私はプログラミングのこの部分に非常に慣れていません。)ユーザーが独自のカスタムコントロールに入力を入力するときに数式をフォーマットできる必要があるアプリケーションに取り組んでいます。これは、コントロールを次のように表示する方法です (この画像は Photoshop で作成されています)。
これは役に立たないため、必要な動作については説明しませんが、Windows Control に基づいていないという考えです。
これは私がすでに持っているコードです:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Support.Components
{
public partial class PartialExpressionEditor : Control
{
public PartialExpressionEditor()
{
InitializeComponent();
}
protected override void OnPaint(PaintEventArgs pe)
{
base.OnPaint(pe);
Brush background = Brushes.White;
pe.Graphics.FillRectangle(background, ClientRectangle);
background.Dispose();
}
}
}
フォームに入れようとすると、次のエラー ダイアログが表示されます。
問題はどこだ?または、なぜこのエラーが表示されるのですか?