Windows Mobile 功能导航界面的设计(1)
2009-09-20 13:00
441 查看
在 Windows Mobile 系统中,程序和设置使用 ListView 控件进行导航,以图标和文字的方式向用户展现系统中的各种应用程序和设置,如下图所示:
隐藏 ListView 边框
public Form1()
{
InitializeComponent();
ShowBorder(listView1.Handle, false);
ShowBorder(listView2.Handle, false);
ShowBorder(listView3.Handle, false);
}
const int GWL_STYLE = -16;
const int WS_BORDER = 0x00800000;
const int SWP_NOSIZE = 0x1;
const int SWP_NOMOVE = 0x2;
const int SWP_FRAMECHANGED = 0x20;
[DllImport("coredll.dll")]
private static extern int GetWindowLong(IntPtr hWnd, int nIndex);
[DllImport("coredll.dll")]
private extern static void SetWindowLong(IntPtr hwnd, int nIndex, int dwNewLong);
[DllImport("coredll.dll")]
private static extern bool SetWindowPos(IntPtr hwnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, int uflags);
private void ShowBorder(IntPtr handle, bool bShow)
{
int style = GetWindowLong(handle, GWL_STYLE);
if (bShow)
{
style |= WS_BORDER;
}
else
{
style &= ~WS_BORDER;
}
SetWindowLong(handle, GWL_STYLE, style);
SetWindowPos(handle, IntPtr.Zero, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
}
效果如下图所示:
现在看起来是不是好多了。用 ListView 作为功能导航界面基本可以满足要求,如果你觉得整个界面都是图标比较单调,可以用 PictureBox 在窗体上方放一张图片,而 TabControl 在图片的下方填满剩余的空间,这样看上去会更加专业,你们可以自己试一试。关于 ListView 作为功能导航界面的介绍就到这,你们可以下载本文的示例代码试试。
示例代码(已更新):ListViewNav.zip
作者:黎波
博客:http://bobli.cnblogs.com/
日期:2009年9月20日
隐藏 ListView 边框
public Form1()
{
InitializeComponent();
ShowBorder(listView1.Handle, false);
ShowBorder(listView2.Handle, false);
ShowBorder(listView3.Handle, false);
}
const int GWL_STYLE = -16;
const int WS_BORDER = 0x00800000;
const int SWP_NOSIZE = 0x1;
const int SWP_NOMOVE = 0x2;
const int SWP_FRAMECHANGED = 0x20;
[DllImport("coredll.dll")]
private static extern int GetWindowLong(IntPtr hWnd, int nIndex);
[DllImport("coredll.dll")]
private extern static void SetWindowLong(IntPtr hwnd, int nIndex, int dwNewLong);
[DllImport("coredll.dll")]
private static extern bool SetWindowPos(IntPtr hwnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, int uflags);
private void ShowBorder(IntPtr handle, bool bShow)
{
int style = GetWindowLong(handle, GWL_STYLE);
if (bShow)
{
style |= WS_BORDER;
}
else
{
style &= ~WS_BORDER;
}
SetWindowLong(handle, GWL_STYLE, style);
SetWindowPos(handle, IntPtr.Zero, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
}
效果如下图所示:
现在看起来是不是好多了。用 ListView 作为功能导航界面基本可以满足要求,如果你觉得整个界面都是图标比较单调,可以用 PictureBox 在窗体上方放一张图片,而 TabControl 在图片的下方填满剩余的空间,这样看上去会更加专业,你们可以自己试一试。关于 ListView 作为功能导航界面的介绍就到这,你们可以下载本文的示例代码试试。
示例代码(已更新):ListViewNav.zip
作者:黎波
博客:http://bobli.cnblogs.com/
日期:2009年9月20日
相关文章推荐
- Windows Mobile 功能导航界面的设计(2)
- Windows Mobile 功能导航界面的设计--九宫图
- 如何设计Windows Mobile功能导航界面
- [翻译]Windows Mobile应用程序设计指导-界面导航【转】
- [翻译]Windows Mobile应用程序设计指导-界面导航
- 设计功能和界面测试用例
- 设计功能和界面测试用例
- (转)设计功能和界面测试用例
- 智能家居:一种移动终端的投影应用程序界面的新功能-设计概要
- 学生与部门管理app-产品功能与界面的简单设计
- Android典型界面设计(6)——ActionBar Tab+ViewPager+Fagment实现滑动导航
- ROS探索总结(十六)(十七)(十八)(十九)——HRMRP机器人的设计 构建完整的机器人应用系统 重读tf 如何配置机器人的导航功能
- 设计并编写一个Windows Mobile 6.5今日界面 之播放器今日插件
- Android典型界面设计(8) ——ViewPager+PagerSlidingTabStrip实现双导航
- Android 手机卫士--导航界面3、4和功能列表界面跳转逻辑处理
- 图书管理系统的操作员信息管理界面及其功能设计
- Android设计登录界面、找回密码、注册功能
- 有关网站功能界面的设计
- 设计功能和界面测试用例