クラス(MessageBoxCustom)のようなMessageBoxを作成しています。Visual Studio(MessageBoxCustomDialog)を使用して外観を変更できるように、デザイナーがサポートするフォームを別のファイルに入れたいと思います。
また、このMessageBoxCustomDialogをMyMessageBoxの外部のコードで到達できないようにしたいので、MessageBoxCustomDialogをネストしています。別のファイルに移動したいので、デザイナーのサポートが必要です。多分部分的なクラスを使用していますか?階層はどのようになりますか?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace System.Windows.Forms
{
public static class MessageBoxCustom
{
public static void Show()
{
(new MessageBoxCustomDialog()).ShowDialog();
}
private class MessageBoxCustomDialog : Form
{
}
}
}