I created an identical scenario in both a windows form and a WPF form (Visual Basic 2008), but only one of them had a problem; the WPF form. It is all centered around 2 Textboxes and one Label. Here is the very straight forward code. I need to use the WPF form so I can get a form height that is not Limited by my monitor.
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
TextBox13.Text = TextBox17.Text
End Sub
In case you are wondering (and I wouldn’t blame you) I did enter the code in the code view of the WPF form. If you know what code to enter in XAML to do the job, I would love to see that.
The Label1 click event where TextBox13 copies from TextBox17 worked fine in the windows form, but I got an error in the WPF form.
This error:
Handles clause requires a WithEvents variable defined in the containing type or one of it’s base types.
I also noticed that I had to declare the two text boxes in WPF, but did not in the windows form.
I guess the remedy is just a little beyond my experience level.