Yes, there's a difference of function. In the first you are asking someone to open the window and in the second you are asking if the person objects to you opening the window.
Since the first is a request it should end with the word 'please'. It means would it trouble you to open the window, while the second says would you be troubled if I open the window.
I don't think the structure "would you mind - ing something" is better than "Please would you open the window". It is often used sarcastically, when annoyed.