首页 > 其他分享 >wince界面优化配置

wince界面优化配置

时间:2022-12-08 20:03:46浏览次数:33  
标签:界面 任务栏 隐藏 uintconst static wince intconst 优化 public


wince下隐藏任务栏大概有以下几种方法:

(1)通过修改注册表;

(2)在应用程序初始化的时候中加入一段代码,将任务栏窗口隐藏。

(3)直接修改explorer的代码,重新编译连接。


三种方法我都尝试了,并在s3c2440的一块板子上实验了,发现:

方法(1)的问题是任务栏隐藏不彻底,总是有一条小横线在屏幕下方!

方法(2)的问题是手写笔点到那个横线,任务栏还会弹上来,气的要命!

方法(3)比较彻底,任务栏没了,在桌面上你想找也找不回来了。


方法(3)修改的代码是:hpc目录中的taskbar.hxx中有关于定义taskbar的高度的宏定义:

#define TASKBAR_HEIGHT        26

#define TASKBAR_HEIGHT_AUTOHIDE 5

 

 

将它们修改为0即可!

方法一:

      (1)隐藏任务栏

       project.reg文件中加入:

[HKEY_LOCAL_MACHINE/Software/Microsoft/Shell/AutoHide]

       @="1"

方法二:

  为了有效的遏制用户在WINCE的PDA系统运行时,通过任务栏直接切换到桌面上,经常会用到界面全屏最大化窗体并将任务栏隐藏的方法,这里通过API函数成功实现以上方法。
  代码测试环境 VS2005 C#+Symbol MC1000
代码如下:

  1. using
  2. using
  3. using
  4. using
  5. using

  6. namespace
  7. {
  8. public class
  9.     {
  10. const uint
  11. const uint
  12. const uint
  13. const uint
  14. const uint
  15. const uint
  16. const int
  17. const int
  18. const int
  19. const int
  20. const int
  21. const int
  22. const int


  23. "aygshell.dll")]
  24. static extern uint SHFullScreen(IntPtr hwndRequester, uint

  25. "coredll.dll")]
  26. public static extern

  27. "CoreDll")]
  28. public static extern IntPtr FindWindow(string lpClassName, string

  29. "CoreDll")]
  30. public static extern bool ShowWindow(IntPtr hwnd, int

  31. public
  32.         {
  33. //
  34. // TODO: 在此处添加构造函数逻辑
  35. //
  36.         }

  37. /// <summary>
  38. /// 全屏显示
  39. /// </summary>
  40. /// <param name="objForm"></param>
  41. public  void
  42.         {
  43. true;

  44.             HideHHTaskBar();

  45.             IntPtr hwnd = GetCapture();
  46. false;
  47. //全屏化窗口
  48.         }

  49. /// <summary>
  50. /// 显示任务栏
  51. /// </summary>
  52. public  void
  53.         {
  54. "HHTaskBar", null);
  55. //显示任务栏
  56.         }

  57. /// <summary>
  58. /// 隐藏任务栏
  59. /// </summary>
  60. public void
  61.         {
  62. "HHTaskBar", null);
  63. //隐藏任务栏
  64.         }

  65. public static void
  66.         {
  67. "wood", "关于", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
  68.         }

  69. public static void
  70.         {
  71. "wood", "About", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
  72.         }
  73.     }
  74. }

在程序中引用上面生成的dll,使用如下:
//声明
private SymbolScanWood.SymbolScanWood _objDisplay;
//隐藏任务栏
_objDisPlay.HideHHTaskBar();
//显示任务栏
_objDisplay.ShowHHTaskBar();

 

 


wince下隐藏任务栏大概有以下几种方法:

(1)通过修改注册表;

(2)在应用程序初始化的时候中加入一段代码,将任务栏窗口隐藏。

(3)直接修改explorer的代码,重新编译连接。


三种方法我都尝试了,并在s3c2440的一块板子上实验了,发现:

方法(1)的问题是任务栏隐藏不彻底,总是有一条小横线在屏幕下方!

方法(2)的问题是手写笔点到那个横线,任务栏还会弹上来,气的要命!

方法(3)比较彻底,任务栏没了,在桌面上你想找也找不回来了。


方法(3)修改的代码是:hpc目录中的taskbar.hxx中有关于定义taskbar的高度的宏定义:

#define TASKBAR_HEIGHT        26

#define TASKBAR_HEIGHT_AUTOHIDE 5

 

 

将它们修改为0即可!

方法一:

      (1)隐藏任务栏

       project.reg文件中加入:

[HKEY_LOCAL_MACHINE/Software/Microsoft/Shell/AutoHide]

       @="1"

方法二:

  为了有效的遏制用户在WINCE的PDA系统运行时,通过任务栏直接切换到桌面上,经常会用到界面全屏最大化窗体并将任务栏隐藏的方法,这里通过API函数成功实现以上方法。
  代码测试环境 VS2005 C#+Symbol MC1000
代码如下:

  1. using
  2. using
  3. using
  4. using
  5. using

  6. namespace
  7. {
  8. public class
  9.     {
  10. const uint
  11. const uint
  12. const uint
  13. const uint
  14. const uint
  15. const uint
  16. const int
  17. const int
  18. const int
  19. const int
  20. const int
  21. const int
  22. const int


  23. "aygshell.dll")]
  24. static extern uint SHFullScreen(IntPtr hwndRequester, uint

  25. "coredll.dll")]
  26. public static extern

  27. "CoreDll")]
  28. public static extern IntPtr FindWindow(string lpClassName, string

  29. "CoreDll")]
  30. public static extern bool ShowWindow(IntPtr hwnd, int

  31. public
  32.         {
  33. //
  34. // TODO: 在此处添加构造函数逻辑
  35. //
  36.         }

  37. /// <summary>
  38. /// 全屏显示
  39. /// </summary>
  40. /// <param name="objForm"></param>
  41. public  void
  42.         {
  43. true;

  44.             HideHHTaskBar();

  45.             IntPtr hwnd = GetCapture();
  46. false;
  47. //全屏化窗口
  48.         }

  49. /// <summary>
  50. /// 显示任务栏
  51. /// </summary>
  52. public  void
  53.         {
  54. "HHTaskBar", null);
  55. //显示任务栏
  56.         }

  57. /// <summary>
  58. /// 隐藏任务栏
  59. /// </summary>
  60. public void
  61.         {
  62. "HHTaskBar", null);
  63. //隐藏任务栏
  64.         }

  65. public static void
  66.         {
  67. "wood", "关于", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
  68.         }

  69. public static void
  70.         {
  71. "wood", "About", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
  72.         }
  73.     }
  74. }

在程序中引用上面生成的dll,使用如下:
//声明
private SymbolScanWood.SymbolScanWood _objDisplay;
//隐藏任务栏
_objDisPlay.HideHHTaskBar();
//显示任务栏
_objDisplay.ShowHHTaskBar();

 

 

标签:界面,任务栏,隐藏,uintconst,static,wince,intconst,优化,public
From: https://blog.51cto.com/u_6958388/5923297

相关文章