Jump to content

Active Form


korasoglu
 Share

Recommended Posts

Arkadaşalar Formu ikinci kez çağırdığımda açıksa active olup nasıl işlem yaptırabilirim. Misal ben datatableye veriyi load yapıyorum Formun loadunda da verileriyüklüyorum form ilk açıldığında load yapıyor ikinci çağırdığımda olmuyor yardımcı olursanız sevinirim

void AcilacakForm(Form Acilacak)
        {
            bool durum = false;
            foreach (Form eleman in this.MdiChildren)
            {
                if (eleman.Name == Acilacak.Name)
                {
                    durum = true; eleman.Activate(); Acilacak.MdiParent = this; aciksayfa = "1"; oo++;
                }

            }
            if (!durum)
            {
                Acilacak.MdiParent = this; Acilacak.Show(); aciksayfa = "1"; oo++;
            }
        }

 

 

Link to comment
Share on other sites

            if (Application.OpenForms["Acilacak_Form"] != null)
            {
                Application.OpenForms["Acilacak_Form"].BringToFront();
                Application.OpenForms["Acilacak_Form"].Activate();
            }
            else
            {
                Acilacak_Form frm = new Acilacak_Form() { MdiParent = this };
                frm.Show();
                frm.BringToFront();
            }

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...