Common C#/WinForm(C#)2009. 3. 19. 17:34
1. 디자인 Form

기본적인 Form 입니다.
위의 Form의 설정 화면 입니다.

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 SearchForm
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
    }
}

아래 소스는 폼을 생성되면 자동으로 처음에 만들어 지는 부분 입니다.

namespace SearchForm
{
    partial class Form1
    {
        /// <summary>
        /// 필수 디자이너 변수입니다.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// 사용 중인 모든 리소스를 정리합니다.
        /// </summary>
        /// <param name="disposing">관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form 디자이너에서 생성한 코드

        /// <summary>
        /// 디자이너 지원에 필요한 메서드입니다.
        /// 이 메서드의 내용을 코드 편집기로 수정하지 마십시오.
        /// </summary>
        private void InitializeComponent()
        {
            this.SuspendLayout();
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(570, 296);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.Name = "MainForm";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "도리검색창 V1.0";
            this.ResumeLayout(false);
        }
        #endregion
    }
}




 위의 속성창에서 해당 굵은 글씨가 변경된 사항 입니다. 위와 같이 속성을 변경 하면 소스상에서는
  아래와 같이 지정이 됩니다.

// 아래는 폼의 스타일을 설정 합니다. [최대크기,최소크기,닫기] 창크기를 조정 할 수 없습니다.
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;

// 최초에 Form이 Load됐을때의 위치를 나타 냅니다. 아래는 화면의 가운데 표시 되도록 설정 합니다.
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
Form 꾸미기

Posted by penguindori