⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainform.cs

📁 windows mobile中的动画指针
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.IO;

namespace AnimatedCursorTest
{
  public partial class MainForm : Form
  {
    private string dll = GetPathToApplicationFile("AnimatedCursors.dll");

    public MainForm()
    {
      InitializeComponent();
    }

    private static string GetPathToApplicationFile(string filename)
    {
      string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);

      return Path.Combine(directory, filename);
    }

    private void menuItem1_Click(object sender, EventArgs e)
    {
      // Use the animated cursor that has 4 frames starting with
      // bitmap id 101, delaying 125 milliseconds between frames.
      using (AnimatedWaitCursor cursor = new AnimatedWaitCursor(dll, 101, 4, 125))
      {
        // Wait for 5 seconds with the animated wait cursor visible
        System.Threading.Thread.Sleep(5 * 1000);
      }
    }

    private void menuItem2_Click(object sender, EventArgs e)
    {
      // Use the animated cursor that has 2 frames starting with
      // bitmap id 105, delaying 80 milliseconds between frames.
      using (AnimatedWaitCursor cursor = new AnimatedWaitCursor(dll, 105, 2, 80))
      {
        // Wait for 5 seconds with the animated wait cursor visible
        System.Threading.Thread.Sleep(5 * 1000);
      }
    }
  }
}

⌨️ 快捷键说明

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