As we don't have a written constitution, I think we may be in uncharted territory. If May can't get a majority, or loses a vote, she resigns as prime minister then (presumably already being sounded out) Corbyn sees if he can get enough support to avoid losing votes on stuff that the coalition of cohesion would all agree on (and the Tories would sit on their hands unless they want to precipitate a July election). He then goes to the Queen, says I think I may be able to command the confidence of the Commons, and she makes him prime minister. It's her prerogative. Then it's vote by vote. No need for a Queen's Speech - that's done at the opening of the parliamentary session and we will have had that (it was 6 months after Churchill was made PM in 1940 that we had the King's Speech to Parliament). The big vote test would be on getting rid of student fees (and the corporate tax rise to pay for it) - lose that, and autumn election is on the cards.