James IV was about a century earlier, and "only" the King of Scotland. But it was his artfully negotiated marriage to Margaret Tudor that set the dynastic stage - for his great grandson (James VI and I) to also inherit the thrones of England and Ireland in the Union of the Crowns.
https://en.wikipedia.org/wiki/House_of_Stuart
And they were monarchs of England, Scotland, and Ireland from King James IV-who-was-also-King James-I through Queen Anne.