• 大小: 0.04M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-02-27
  • 语言: C#
  • 标签: 鼠标  变色  焦点  

资源简介

鼠标焦点变色

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FocusChangeColor
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void textBox1_Enter(object sender EventArgs e)
        {
            ((TextBox)sender).BackColor = Color.CornflowerBlue;
        }

        private void textBox1_Leave(object sender EventArgs e)
        {
            ((TextBox)sender).BackColor = Color.White;
        }

        private void textBox1_KeyDown(object sender KeyEventArgs e)
        {
            if (e.KeyValue == 13)
            {
                int n = Convert.ToInt32(((TextBox)sender).Tag.ToString());
                Clear_Control(this.Controls n 6);
            }
        }

        #region  遍历指定的控件
        /// 

        /

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-04-24 19:56  焦点变色\
     目录           0  2012-04-24 19:56  焦点变色\FocusChangeColor\
     文件         938  2009-02-11 13:44  焦点变色\FocusChangeColor.sln
     文件       14336  2009-02-11 14:46  焦点变色\FocusChangeColor.suo
     目录           0  2010-12-12 01:00  焦点变色\FocusChangeColor\bin\
     目录           0  2012-04-24 19:56  焦点变色\FocusChangeColor\bin\Debug\
     文件       11264  2009-02-11 14:45  焦点变色\FocusChangeColor\bin\Debug\FocusChangeColor.exe
     文件       24064  2009-02-11 14:45  焦点变色\FocusChangeColor\bin\Debug\FocusChangeColor.pdb
     文件       14328  2009-02-11 14:46  焦点变色\FocusChangeColor\bin\Debug\FocusChangeColor.vshost.exe
     文件         490  2007-07-21 01:33  焦点变色\FocusChangeColor\bin\Debug\FocusChangeColor.vshost.exe.manifest
     文件        3743  2009-02-11 13:57  焦点变色\FocusChangeColor\FocusChangeColor.csproj
     文件        1908  2009-02-11 14:45  焦点变色\FocusChangeColor\Form1.cs
     文件        9151  2009-02-11 14:37  焦点变色\FocusChangeColor\Form1.Designer.cs
     文件        5814  2009-02-11 14:37  焦点变色\FocusChangeColor\Form1.resx
     目录           0  2010-12-12 01:00  焦点变色\FocusChangeColor\obj\
     目录           0  2012-04-24 19:56  焦点变色\FocusChangeColor\obj\Debug\
     文件        1123  2009-02-11 14:46  焦点变色\FocusChangeColor\obj\Debug\FocusChangeColor.csproj.FileListAbsolute.txt
     文件         847  2009-02-11 14:37  焦点变色\FocusChangeColor\obj\Debug\FocusChangeColor.csproj.GenerateResource.Cache
     文件       11264  2009-02-11 14:45  焦点变色\FocusChangeColor\obj\Debug\FocusChangeColor.exe
     文件         180  2009-02-11 14:37  焦点变色\FocusChangeColor\obj\Debug\FocusChangeColor.Form1.resources
     文件       24064  2009-02-11 14:45  焦点变色\FocusChangeColor\obj\Debug\FocusChangeColor.pdb
     文件         180  2009-02-11 13:57  焦点变色\FocusChangeColor\obj\Debug\FocusChangeColor.Properties.Resources.resources
     目录           0  2009-08-31 11:39  焦点变色\FocusChangeColor\obj\Debug\TempPE\
     文件         497  2009-02-11 13:44  焦点变色\FocusChangeColor\Program.cs
     目录           0  2012-04-24 19:56  焦点变色\FocusChangeColor\Properties\
     文件        1364  2009-02-11 13:44  焦点变色\FocusChangeColor\Properties\AssemblyInfo.cs
     文件        2882  2009-02-11 13:44  焦点变色\FocusChangeColor\Properties\Resources.Designer.cs
     文件        5612  2009-02-11 13:44  焦点变色\FocusChangeColor\Properties\Resources.resx
     文件        1101  2009-02-11 13:44  焦点变色\FocusChangeColor\Properties\Settings.Designer.cs
     文件         249  2009-02-11 13:44  焦点变色\FocusChangeColor\Properties\Settings.settings

评论

共有 条评论