代码之家  ›  专栏  ›  技术社区  ›  Adrian Grigore

如何在WindowsMobile6上以编程方式显示等待图标?

  •  1
  • Adrian Grigore  · 技术社区  · 14 年前

    如何在WindowsMobile6上以编程方式显示等待图标?

    这应该很容易做到,但我不能谷歌它,因为有那么多等待图标更换那里…:-)

    谢谢,

    阿德里安

    2 回复  |  直到 14 年前
        1
  •  3
  •   ctacke    14 年前

    像这样的东西有些有用:

    class WaitCursor : IDisposable
    {
        public WaitCursor()
        {
            Cursor.Current = Cursors.WaitCursor;
        }
    
        public void Dispose()
        {
            Cursor.Current = Cursors.Default;
        }
    }
    

    public Foo()
    {
        using (var c = new WaitCursor())
        {
           // do long-running stuff
           // when we exit the using block, the cursor will return to the default state
        }
    }
    
        2
  •  1
  •   PaulG    14 年前

    using System.Windows.Forms;
    Cursor.Current = Cursors.WaitCursor;