2017-04-22 13 views
-2

私のPCはそれをサポートしていないので、私はmsbuildを持っていて、私はソリューションをコンパイルするので、Visual Studioを持っていません。私はビジュアルオブジェクトのVisual Studioを作成する必要がある場合に問題がある C#Visual StudioのWindowsフォームビジュアルコンポーネントはどこでインスタンス化されていますか?

private void InitializeComponent() 
    { 
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); 
     this.toolStrip1 = new System.Windows.Forms.ToolStrip(); 
     this.tsbtnFuncionarios = new System.Windows.Forms.ToolStripButton(); 
     this.tsbtClientes = new System.Windows.Forms.ToolStripButton(); 
     this.tsbtnLivros = new System.Windows.Forms.ToolStripButton(); 
     this.toolStrip2 = new System.Windows.Forms.ToolStrip(); 
     this.tsbtnSair = new System.Windows.Forms.ToolStripButton(); 
     this.toolStrip1.SuspendLayout(); 
     this.toolStrip2.SuspendLayout(); 
     this.SuspendLayout(); 
     // 
     // toolStrip1 
     // 
     this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 
     this.tsbtnFuncionarios, 
     this.tsbtClientes, 
     this.tsbtnLivros}); 
     this.toolStrip1.Location = new System.Drawing.Point(0, 0); 
     this.toolStrip1.Name = "toolStrip1"; 
     this.toolStrip1.Size = new System.Drawing.Size(618, 55); 
     this.toolStrip1.TabIndex = 0; 
     this.toolStrip1.Text = "toolStrip1"; 
     and continue... 

このような変数は、新しいインスタンス化ビジュアルオブジェクトを受け取り作り、後で InitializeComponent方法のプロパティを設定 form1.designer.csはやるか、それを作るために既存の変数タイプを編集します私は私の学校でそれを使用するビジュアルスタジオのグラフィカルレイアウトを使用してフォーム上にボタンを配置するなど、他のオブジェクトの型を受け取る変数は、ビジュアルオブジェクトを受信する変数のどこかに作成されますが、少なくとも私はここでインスタンス化されていない form1.resx(私はこのファイルに書かれていることの多くを理解していません)ので、これらの変数はどこでインスタンス化されていますか、どのように新しい変数を作成したり、 TextBox1.Textデフォルトのように、彼らの宣言、そのインスタンス化、および特定のプロパティのデフォルト値をデザインコントロールを持っています私はまだ二つ以上のリンク

答えて

1

Form1.Designer.csを投稿することができません申し訳ありません

Form1.cs, Form.Designer.cs and Form.resx source code link

値。 Visual StudioはForm1.Designer.csを管理し、開発者がWinFormsデザイナを変更したときに更新します。

Form1.csには、フォームのイベントハンドラとコンストラクタがあります。通常、Visual Studioの開発者はここにコードを記述します。

Form1.resxは、一般的には使用されていません。詳細については、以下のスタックオーバーフローの回答を参照してください。 purpose of form1.designer.cs and form1.resx

+0

私はそれが#end地域のファイルの終わりにあるという宣言を見つけることができました。私にこのようなことは疑いの余地はないと宣言する前に非論理的です –

関連する問題