1- Create vb.net / wpf application.
2- Create three WPF Windows as Window1, Window2 and Window3
3- Copy and paste following xaml codes into MainWindow.
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<StackPanel Width="180" Height="120">
<Button x:Name="Button1" Height="30" Margin="5" Content="Button1"/>
<Button x:Name="Button2" Height="30" Margin="5" Content="Button2"/>
<Button x:Name="Button3" Height="30" Margin="5" Content="Button3"/>
</StackPanel>
</Grid>
</Window>
4- Copy and paste following vb.net codes into MainWindow code behind.
Class MainWindow
Private Sub Button1_Click(sender As Object, e As RoutedEventArgs) Handles Button1.Click
Dim myWindow1 As New Window1()
myWindow1.Show()
End Sub
Private Sub Button2_Click(sender As Object, e As RoutedEventArgs) Handles Button2.Click
Dim myWindow2 As New Window2()
myWindow2.Show()
End Sub
Private Sub Button3_Click(sender As Object, e As RoutedEventArgs) Handles Button3.Click
Dim myWindow3 As New Window3()
myWindow3.Show()
End Sub
Private Sub MainWindow_KeyDown(sender As System.Object, e As System.Windows.Input.KeyEventArgs) Handles MyBase.KeyDown
If e.Key = Key.F1 Then
Dim myWindow1 As New Window1()
myWindow1.Show()
End If
If e.Key = Key.F2 Then
Dim myWindow2 As New Window2()
myWindow2.Show()
End If
If e.Key = Key.F3 Then
Dim myWindow3 As New Window3()
myWindow3.Show()
End If
End Sub
End Class
5- Run this project, then click Button2, then close Window2, then press F3, then close Window3
My question:
I dont want to see dotted lines in Button edges as you can see here https://prnt.sc/lz8856