Melt the butter in a medium sauce pot over medium-high heat. Add the minced onion, and sauté for 3 minutes, just until they are translucent.
Add the frozen corn, and sauté for 2 minutes, stirring constantly.
Whisk the cornstarch into the milk and then stir into the pot, stirring until the milk begins to thicken.
Reduce the heat to low, and stir the sugar, salt, pepper, and vanilla extract into the pot. Cover, and let cook for 3 minutes. Remove from the heat, and let cool for 2 minutes before serving.