有时候我们需要弹出个提示框然后让它自己关闭,然而实际使用中的弹出框确实阻塞进程,网上貌似有一种另类的解决方式,大致思路是把弹出框放到另外的一个窗体上,直接贴代码 主窗体 using System; using System.Windows.Forms; namespace WinForm { public partial class MainForm : Form { public MainForm() { InitializeComponent(); } private void button
这是一个自定义控件,继承了TextBox,在TextBox基础上添加了4个属性(下载): 1.ControlType 文本框需要验证的类型 2.ControlTypeText 显示的文字(只读) 3.IsNULL 填写的内容是否可空 4.IsPass 格式是否正确(在文本框失去焦点时验证,只读) 代码如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Sys
亲测win7下可用,win8下由于系统不支持Aero效果,所以效果不是半透明的. 代码: 博客园插入不了代码了..... public partial class Form1 : Form { int en; public struct MARGINS { public int m_Left; public int m_Right; public int m_Top; public int m_Buttom; }; [DllImport("dwmapi.dll")] private s
delegate void SetTextCallback(string text); private void showClientMsg(string text) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns tr
首先下载Visual Studio International Pack 1.0,官方下载地址:http://www.microsoft.com/downloads/zh-cn/details.aspx?FamilyID=44CAC7F0-633B-477D-AED2-99AEE642FC10&displaylang=zh-cn.下载完毕后解压,解压后可以发现7个MSI安装文件,其中CHSPinYinConv.msi是汉字拼音组件,CHTCHSConv.msi是进行繁简体互转组件,安装这两个MS