Root > Documents > Programlama > Csharpta çoklu formlarla çalışma
Cyber-Warrior.Org \ Doküman \ Programlama > Csharpta çoklu formlarla çalışma
Madde
  Yazar : espirator
  Date : 27.11.2009 11:11:45
 
# Csharpta çoklu formlarla çalışma
 

 

Csharp’ta çoklu formlarla çalismak

(1) Baslat Visual Studio 2008 (Baslat | Tüm Programlar | Microsoft Visual Studio 2008 | Microsoft Visual Studio 2008)

(2) Create a new C# project from File | New | Project. (2) Dosyadan yeni bir C # projesi | Yeni | Proje olusturun. The New Project dialog box opens up as shown in Figure 1. New Project iletisim kutusu Sekil 1’de gösterildigi açilir. Modify the project name and change the target directory if required. Proje adini degistirin ve hedef dizin degistirmek gerekirse.

Figure 1 Sekil 1

(3) A new form with the title Form1 appears on the screen. Baslik Form1 ile (3) yeni bir form ekranda görüntülenir. Add a Button control to it from the Toolbox. Buna Toolbox bir Button kontrolü ekleyin. Change the caption to OK by altering the Text property from the Properties window. Tamam’i Properties penceresinden Text özelligini degistirerek basligi degistirin.

Figure 2 Sekil 2

(4) Add another form to the project by selecting Add Windows Form item from Project menu. (4) proje için Proje menüsünde Windows Formu öge ekle seçerek baska bir formu ekleyin. Add a Label control to it and change its text as “This is Form 2″ Buna bir Label kontrolü ekleyin ve metin degisikligi olarak "Bu Form 2 ’dir"

Figure 3 Sekil 3

(5) Activate Form 1 by double clicking Form1.cs from Solution Explorer. (5) etkinlestirin Formu 1 Çözüm adresinden çift tiklayarak Form1.cs Explorer tarafindan. Double click the Button control and add the following code Çift tiklayin Dügme kontrolü ve asagidaki kodu ekleyin

 Form2 f2 = new Form2(); Form2 f2 = new Form2 ();

 

 f2.Show(); f2.Show ();

 

Figure 4 Sekil 4

(6) Run the project by pressing F5 key. (6) çalistirin proje F5 tusuna basarak. You can also run by selecting Start Debugging item from the Debug menu. Ayrica Debug menüsünden Start Debugging ögeyi seçerek çalistirabilirsiniz.

Figure 5 Sekil 5

Kolay gelsin…;))

 

   
   
Cyber-Warrior TIM All Legal and illegal Rights Reserved.\CWDoktoray 2001©