private void SearchBox_HandleCreated(object sender, EventArgs e)
{
if (OsUtils.WinVistaOrLater())
{
// Set the theme of this parent control and the edit control, so they are rendered correctly
Marshal.ThrowExceptionForHR(NativeMethods.SetWindowTheme(this.Handle, "SearchBoxComposited", null));
Marshal.ThrowExceptionForHR(NativeMethods.SetWindowTheme(this.textBox.Handle, "SearchBoxEditComposited", null));
}
}