Choose "Pin To Window" menu item from note's context menu.
In dialog box that appears choose one of available windows.
Once pinned, the note will appear when a window it's pinned to becomes visible or is restored from task bar. If the window is closed or minimized the pinned note will disappear.
Instead of using fully specified window text, you may use wildcards. In this case the note becomes pinned not only to selected window, but to all windows from same class whose text matches the text with wildcards.
To unpin choose "Unpin" menu item from note's context menu.