1-) C# -
.dll ile form oluşturmak
1-)File->new Project->Class Library de ve aşşağıdaki kodu yaz
1.1-)project->add referance->framework->System.windows.forms i ekle sonra aşşağıdakini yaz
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace form_dll
{
public class Class1
{
public void Goster()
{
Form form = new Form();
form.Text = "ramazan haber";
form.Controls.Add(new Label()
{
Text = "ramazan"
});
form.Show();
}
}
}
2-)File->new Project->Windows Forms Application de ve aşşağıdaki kodu yaz
2.1-)project->add referance->solution->form_dll i ekle sonra aşşağıdakini yaz
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace form_c
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
form_dll.Class1 deger = new form_dll.Class1();
deger.Goster();
}
}
}