lamont Posted August 27, 2015 Share Posted August 27, 2015 arkadaşlar Form1 Den Form2 Açarken Form1 Kapatma Form2 de İşimiz Bitince Tekrar Form1 Açmak İçin Bir Çözüm bulamadım Sakın hide() Metodunu Söylemeyin Çünkü Ben Bellekte Tutmasını İstemiyorum Kapatmasını İstiyorum Bunu Nasıl Yapabilirim Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted August 27, 2015 Editor Share Posted August 27, 2015 Main formu kapatamazsın program kapanır. Quote Link to comment Share on other sites More sharing options...
lamont Posted August 27, 2015 Author Share Posted August 27, 2015 Birden Fazla Form la Çalışacam Hepsini Hide Metodunu Kullanırsak Program Yavaşlar Pairs Bir Çözüm Olması Lazım Quote Link to comment Share on other sites More sharing options...
artal73 Posted August 27, 2015 Share Posted August 27, 2015 pairs'in dediği gibi Main Form kapanırsa program çalışmasını sonlandırır. Şöyle bir teknik kullanılabilir. MainForm ve Form2 adlarında 2 formumuz olsun. Form2'yi açıp MainForm u tamamen kapatmak istiyorsanız Application.Restart(); metodu ile programın kapatılıp Form2 üzerinden başlamasını sağlamalısınız. Programın hangi form ile başlıyacağı Program.cs class'ındaki Application.Run(); metodunda belirtilir, Application.Run(new MainForm()); gibi. Application.Run(); metodunu bir Switch içerisinde kullanarak açılacak formu belirliyebilirsiniz. Proje içinde bir dosyada bir anahtar kullanman lazım. string anahtar = "MainForm"; switch (anahtar) { case "MainForm": Application.Run(new MainForm()); break; case "Form2": Application.Run(new Form2()); break; } Quote Link to comment Share on other sites More sharing options...
Bitmap Posted August 28, 2015 Share Posted August 28, 2015 Program.cs içinden kontrol edersen eğer kapatıp açabilirsin, ama pek sağlıklı bir yöntem değil. Quote Link to comment Share on other sites More sharing options...
lamont Posted August 30, 2015 Author Share Posted August 30, 2015 artal Tamam Main Formu Olayına Bir Şey Demiyor Peki Form İçinde Form Açarsak Nasıl Olacak Amaç Bellegin Şişmesini Engellemek Yani Diger Formlarda Birbirleri Arasında Dolaşırken Kapatabilirmiyiz Quote Link to comment Share on other sites More sharing options...
engin_imren_24 Posted August 30, 2015 Share Posted August 30, 2015 tek forum üzerinde tabpanel de kullanılabilir birden fazla forumla uğraşmak sorun ram i düşünüyosan tab en ideali Quote Link to comment Share on other sites More sharing options...
lamont Posted August 30, 2015 Author Share Posted August 30, 2015 Engin Bilmiyorduk Aydınlattıgn İçin Tşk Ederim Quote Link to comment Share on other sites More sharing options...
SecondLife Posted August 30, 2015 Share Posted August 30, 2015 run time de main formu değiştir. NewForm form = new NewForm(); this.Hide(); if (form.ShowDialog() == DialogResult.OK) this.Close(); Quote Link to comment Share on other sites More sharing options...
alpinas Posted October 15, 2015 Share Posted October 15, 2015 3 saniye yada 2 saniye main form geriye dönüş open gecikmesi ve ram cachede hata yığına sebeb olabilir olur fakat pek sağlıklı olmaz.! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.