En iyi yanıtlayıcılar
Kod İçinde Tanımlanan Formun Eventlerini Düzenleme

Soru
-
Merhaba,
Uygulamamda window adlı bir forma ihtiyaç duydum ancak görsel düzenleme yapmayacağımdan dolayı "public static Form window = new Form();" şekilde farklı bir class içinde tanımladım. Bu tanımladığım formun "FormClosing" eventine komut yazmak istiyorum. Umarım anlatabilmişimdir. Nasıl yapacağım?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace azyns{ class controls { public static Form window = new Form(); public static Form boot = new boot(); public static Form login = new login(); public static Form home = new home(); public static void indentify() { window.IsMdiContainer = true; window.Size = new System.Drawing.Size(1280, 720); window.Show(); } public static void run() { boot.MdiParent = window; boot.Show(); } } }
Yanıtlar
-
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace azyns{ class controls { public static Form window = new Form(); public static Form boot = new boot(); public static Form login = new login(); public static Form home = new home(); public static void indentify() { window.FormClosing += windowClosing; window.IsMdiContainer = true; window.Size = new System.Drawing.Size(1280, 720); window.Show(); } public static void run() { boot.MdiParent = window; boot.Show(); } private void windowClosing(Object sender, FormClosingEventArgs e) { // ... } } }
Sorunuzun yanıtı bu ise "Yanıt olarak işaretle"yerek siz de forumun işleyişine katkıda bulununuz...
- Düzenleyen MuratAKSARAY 3 Haziran 2018 Pazar 17:54
- Yanıt Olarak İşaretleyen WinDPzero 3 Haziran 2018 Pazar 19:38
Tüm Yanıtlar
-
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace azyns{ class controls { public static Form window = new Form(); public static Form boot = new boot(); public static Form login = new login(); public static Form home = new home(); public static void indentify() { window.FormClosing += windowClosing; window.IsMdiContainer = true; window.Size = new System.Drawing.Size(1280, 720); window.Show(); } public static void run() { boot.MdiParent = window; boot.Show(); } private void windowClosing(Object sender, FormClosingEventArgs e) { // ... } } }
Sorunuzun yanıtı bu ise "Yanıt olarak işaretle"yerek siz de forumun işleyişine katkıda bulununuz...
- Düzenleyen MuratAKSARAY 3 Haziran 2018 Pazar 17:54
- Yanıt Olarak İşaretleyen WinDPzero 3 Haziran 2018 Pazar 19:38
-
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace azyns{ class controls { public static Form window = new Form(); public static Form boot = new boot(); public static Form login = new login(); public static Form home = new home(); public static void indentify() { window.FormClosing += windowClosing; window.IsMdiContainer = true; window.Size = new System.Drawing.Size(1280, 720); window.Show(); } public static void run() { boot.MdiParent = window; boot.Show(); } private void windowClosing(Object sender, FormClosingEventArgs e) { // ... } } }
Sorunuzun yanıtı bu ise "Yanıt olarak işaretle"yerek siz de forumun işleyişine katkıda bulununuz...
Teşekkürler