摘要: 问题描述:VS.NET提示"试图运行项目时出错:无法启动调试。绑定句柄无效"解决办法 解决方案:不要急着重装.在菜单栏里面选择"调试">>"开始执行(不调试)"试试,如果这样能成功,就不需要重装两个解决方法:1) 打开项目属性,选择调试选项卡,将“启用非托管代码调试”一项钩上。2) 打开项目属性,选择调试选项卡,将“启用Visual Studio宿主... 阅读全文
posted @ 2009-09-07 23:17 94cool 阅读(316) 评论(0) 推荐(0)
摘要: 在BS系统中,有时候一个业务操作需要花很多的时间处理,如果没有任何提示的话,用户还以为是没有点到会继续点击,造成二次点击,或者产生不耐烦的心里。所有最好加个滚动的提示,罩在页面上,一来控制用户再次点击,而来让用户感觉到计算机正在运行操作:如下图其实这个东东只要写很少的代码就能实现,JS代码如下:[代码]在asp.net页面上直接把此JS文件包括进来,调用Show方法就行,如 this.Button... 阅读全文
posted @ 2009-09-07 15:17 94cool 阅读(6250) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Text;using System.Runtime.InteropServices;namespace WaveLib{ public class AudioMixerHelper { public const int MMSYSERR_NOERROR = 0; public co... 阅读全文
posted @ 2009-09-07 14:33 94cool 阅读(379) 评论(0) 推荐(0)
摘要: using System.Text;using System;using System.Runtime.InteropServices;class API{ #region "API函数定义 " [DllImport("user32.dll ", CharSet = CharSet.Unicode)] private static extern int SendMessage(int hWnd, ... 阅读全文
posted @ 2009-09-07 14:32 94cool 阅读(1126) 评论(0) 推荐(0)
摘要: System.Diagnostics.Process.Start("timedate.cpl"); 阅读全文
posted @ 2009-09-07 14:30 94cool 阅读(450) 评论(0) 推荐(0)
摘要: 在.netwinform应用程序中如何打开capslock键呢?或者在程序启动的时候,capslock键就变亮了呢,今天在国外的一个论谈看到了解决方案,事实上很简单的.我们只要DllImportattribute去调用系统的函数就可以了.部分代码如下: 复制 保存private void Form1_Load(object sender, EventArgs e){ const int KEYEV... 阅读全文
posted @ 2009-09-07 14:25 94cool 阅读(399) 评论(0) 推荐(0)
摘要: 以前整理的Win32API,可以直接在C#中直接调用,在做WinForm时还是很有帮助的。以前用在一个多窗口界面中,当轮询窗口时,调用API会提高很多效率。 源码下载 http://files.cnblogs.com/lordeo/win32api.rar 源码包含三个文件Win32API.cs,Enums.cs,Structs.cs分别如下 Win32API.cs 复制 保存using Syst... 阅读全文
posted @ 2009-09-07 14:24 94cool 阅读(702) 评论(0) 推荐(1)
摘要: public void SetWindowRegion(){ System.Drawing.Drawing2D.GraphicsPath FormPath; FormPath = new System.Drawing.Drawing2D.GraphicsPath(); Rectangle rect = new Rectangle(0, 22, this.Width, this.Height - 2... 阅读全文
posted @ 2009-09-07 14:22 94cool 阅读(351) 评论(0) 推荐(0)
摘要: 使用独立的DLL存储图片,这样可以把我们要用的图片文件全放在一个DLL当中 这样工程当中就只没有那么多的图片文件了 1.在解决方案里添加一个新的class工程PicResource,然后把图片文件夹skin复制到工程目录下,并把skin包含在工程中; 2.在刚才新建的工程里选中skin文件夹下的所有图片,在property中改变BuildAction属性为EmbeddedResource; .编译... 阅读全文
posted @ 2009-09-07 14:20 94cool 阅读(280) 评论(0) 推荐(0)