2008/PLAN2008. 7. 2. 15:39
07월02일
  - 윈도우 프로그래밍 공부
  - 시스템 프로그래밍 공부 준비 완료
-----------------------------------------
07:30 일어난다!

08:30 싯고 공부할 준비 한다.
        - 윈도우 프로그래밍 , 시스템 프로그래밍
        - 교양과목 학습 준비..
        - 은행에서 적금 통장 만들기

10:30 - 윈도우 프로그래밍 공부

10:35 ~ 12:00 놀기

12:00 ~ 15:00 C# 프로젝트 진행 (회원 가입)

16:00 ~ 20:00 시스템 프로그래밍 학습 하기

Posted by penguindori
2008/C#2008. 6. 23. 19:31

MID Form 이란?  Multiple Document Interface의 약자로 간략하게 설명을 하자면
                        한폼안에 여러게의 폼을 또 생성하는 거다.
                        즉, 한글 프로그램을 보면 여러 문서를 뛰우지 않는가? 그렇게
                        생각 하자!!

C# 으로 MDI Form을 만들어 봅시다.

힌트;;;
-------------------------------------------------------------------
Child Form에서

public MainForm mainForm;
 public void Initialize()
        {
            this.Location = new Point(0, 0);
            this.StartPosition = FormStartPosition.Manual;
            this.FormBorderStyle = FormBorderStyle.None;
            this.WindowState = FormWindowState.Normal;
            this.Dock = DockStyle.Fill;
        }

Main  Form 에서...

버튼 클릭시
 private void toolBarCreatePlan_Click(object sender, EventArgs e)
        {
            ICS.IssuePlan.frmCreatePlan form = new ICS.IssuePlan.frmCreatePlan();
            if (ToolBarShow(form) == false)
            {
                form.Text = "발급계획수립";
                //////form.issuePlanList = _IssuePlanList;
                ShowMdiForm(form, form.Text, form.Text);
            }
        }


public void ShowMdiForm(Common.ChildForm form, string state, string title)
        {
            form.Location = new Point(0, 0); ;
           form.StartPosition = FormStartPosition.Manual;
            form.FormBorderStyle = FormBorderStyle.None;
            form.WindowState = FormWindowState.Normal;

            ICS.Common.ChildForm forms = new ICS.Common.ChildForm();
           
            form.mainForm = this;
            form.MdiParent = this;
            form.remote = this._remoting;
            form.commFunc = this.commonFunc;
            form.Text = title;

            form.Closed += new EventHandler(MainForm.ProgressMain.formCloseEvent);

            form.Show();

            SetTitleBar(title);
        }

#region ToolBarShow : ToolBar 클릭시 Form 생성 유무 확인
        public bool ToolBarShow(object form)
        {
            for (int i = 0; i < this.MdiChildren.Length; i++)
            {
                if (this.MdiChildren[i].GetType().ToString().Equals(form.GetType().ToString()) == true)
                {
                    this.MdiChildren[i].BringToFront();

                    return true;
                }
            }
            return false;
        }
        #endregion

 public void SetTitleBar(string title)
        {
            //local Host Ip/Name 가져오기
            string hostIpName = GetHostIpName();
            if (hostIpName != "")
            {
                hostIpName = "   [ " + hostIpName + " ]";
            }

            if (title != null && title != "")
                this.Text = "발급 제어 시스템(ICS)" + "   -   " + title + hostIpName;
            else
                this.Text = "발급 제어 시스템(ICS)" + "   " + hostIpName;
        }
        #endregion

-----------------------------------------------------------------------

Posted by penguindori