waitcursormanager.jsl

来自「vs 2005 中 用的 vb 示例 程序,测试运行良好,对初学者有一定参考价值」· JSL 代码 · 共 44 行

JSL
44
字号
package Microsoft.Samples.Windows.Forms.EventBasedAsync; 

//---------------------------------------------------------------------
//  This file is part of the Microsoft.NET Framework SDK Code Samples.
// 
//  Copyright (C) Microsoft Corporation.  All rights reserved.
// 
//This source code is intended only as a supplement to Microsoft
//Development Tools and/or on-line documentation.  See these other
//materials for detailed information regarding Microsoft code samples.
// 
//THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
//KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//PARTICULAR PURPOSE.
//---------------------------------------------------------------------

#region Import directives

import System.*;
import System.Windows.Forms.*;

#endregion

class WaitCursorManager implements IDisposable
{
    private Form f = null;
    private Cursor stored = null;

    WaitCursorManager(Form f)
    {
        this.f = f;
        this.stored = f.get_Cursor();
        f.set_Cursor(Cursors.get_WaitCursor());
    } //WaitCursorManager

    public void Dispose()
    {
        f.set_Cursor(stored);
        f = null;
        stored = null;
    } //Dispose
} //WaitCursorManager

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?