TabControlをWindows Mobile 6.5ライクな表示にする

Form1のコンストラクタで各種EnableVisualStyleを使っている事を前提としています。なお、以下の元のコードは、http://d.hatena.ne.jp/iseebi/20100521/p1 を参考にしています。

C#

private const int TCS_THEME = 0x4000;
 
  public void EnableVisualStyle(TabControl tabControl)
  {
      IntPtr hNativeTab = GetWindow(tabControl.Handle, GW_CHILD);
      int style = GetWindowLong(hNativeTab, GWL_STYLE);
      style = SetWindowLong(hNativeTab, GWL_STYLE, style | TCS_THEME);
  }

適用前

TabControl適用前

適用後/h3>
TabControl適用後