C# Mdi Form Kullanımı

c-sharp
[csharp]

private void CheckMdiChildren(Form form)
{
foreach (Form frm in this.MdiChildren)
{
if (frm.GetType() == form.GetType())
{
frm.Focus();
return;
}
}

form.MdiParent = this;
form.Show();
}

[/csharp] [csharp]

Form1 yeniform = new Form1 ();
CheckMdiChildren(yeniform );

[/csharp]

.NET ile Event İşlemleri

c-sharp
[csharp]

try
{
//işlemler
}
catch (Exception ex)
{
EventLog log = new EventLog();
log.Source = “Application”;
log.WriteEntry(ex.Message, EventLogEntryType.Error, 200);

}

[/csharp]

.Net ile Binary Resim Okuma

c-sharp
[csharp]

byte[] resim = (byte[])dt.Rows[0][“Resim”];
MemoryStream stream = new MemoryStream(resim);
pictureEdit1.Image = System.Drawing.Image.FromStream(stream);

[/csharp]