Show icon menu on Windows


I’m trying to get a dark UI around my application and it seems like the only way is to remove the frame and create my own menu. I’ve got the rest of the menu to work, but now I want to add an icon on the left-hand side that functions like the standard icon when clicked (see the screenshot).

Is there any way to trigger this menu?