I am relatively new to c# but I am currently creating a Windows Form that has an editor window. I'm struggling with the Paste button though as I have 2 textbox fields, one for the title of the note and one for the note itself. I'm wanting to be able to paste from the clipboard into either textbox.
I have tried using if statements based on noteText.Focused
and titleText.Focused
but obviously this doesn't work as the Paste button becomes focused as soon as you click it.
Any suggestions would be of great help.
Create a local variable and save last focused textBox in it.