27-09-15, 11:18 AM
اشكرك كثيرا استاذ السندباد
الخاصية Name
لم تفلح معي في اغلاق النافذة الاخرى من خلال نافذة مفتوحة ولكن title ضبط
#C
private void button1_Click(object sender, RoutedEventArgs e)
{
foreach (Window win in Application.Current.Windows)
{
if (win.Title == "Window1")
{
win.Close();
}
}
}
VB
Private Sub button1_Click(sender As Object, e As RoutedEventArgs)
For Each win As Window In Application.Current.Windows
If win.Title = "Window1" Then
win.Close()
End If
Next
End Sub
الخاصية Name
لم تفلح معي في اغلاق النافذة الاخرى من خلال نافذة مفتوحة ولكن title ضبط
#C
private void button1_Click(object sender, RoutedEventArgs e)
{
foreach (Window win in Application.Current.Windows)
{
if (win.Title == "Window1")
{
win.Close();
}
}
}
VB
Private Sub button1_Click(sender As Object, e As RoutedEventArgs)
For Each win As Window In Application.Current.Windows
If win.Title = "Window1" Then
win.Close()
End If
Next
End Sub
سبحان الله والحمدلله ولا إله إلا الله والله أكبر
اللهم اغْفِرْ لِلمؤمنين والمؤمنات والمسلمين والمسلمات الأحياء منهم والأموات


