In Act II, Scene 2, Hamlet, whom Polonius has reported as mad to King Claudius and Queen Gertrude, walks about reading as he encounters Polonius. Then, he exchanges puns and non-sequiturs with the loquacious and meddling old man, but Polonius is clever enough to see through Hamlet's charades, "Though this be madness, yet there is method in't" (2.2.205); however, he decides to leave and devise a meeting between his daughter Ophelia and Hamlet in order to eavesdrop behind a curtain, in the hope of learning more about the Prince.
When Guildenstern and Rosencratz do enter, Hamlet greets them, "My excellent good friends!" and he inquires about their well-being. That Hamlet's feelings are genuine is evinced in his confidence to them that he merely pretends to be mad:
I am but mad north-northwest: when the wind is southerly I know a hawk from a handsaw” (2.2. 381-382).
Nevertheless, before confiding in them, he demands that they be direct with him about the purpose of their coming to him, calling upon
...the rights of our fellowship, by the constancy of our youth, by the obligation of our ever-preserved love....(2.272-274)
It is not until he demands if they love him, that they explain why they have come, saying that they "were sent for." At this point, Hamlet loses respect for them as he realizes that they are being manipulated by Claudius. Even though Rosencratz mentions that they have arranged an interlude by the players that Hamlet would be “wont to take … delight in” (2.2. 331), it is at this point that Hamlet begins to feel differently toward his former school friends.