随笔分类 -  C#de Window程序设计

摘要:一 提起位运算,人们往往想到它的高效性,无论是嵌入式编程还是优化系统的核心代码,适当的运用位运算总是一种迷人的手段,或者当您求职的时候,在代码中写入 适当的位运算也会让您的程序增加一丝亮点,最初当我读《编程之美》求“1的数目”时,我才开始觉得位运算是如此之美,后来读到《Hacker's Deligh... 阅读全文
posted @ 2015-12-13 20:28 凡的世界 阅读(356) 评论(0) 推荐(0) 编辑
摘要:菜单Project->'xxxx'Properties->Build->Output->勾上XMLDocumentationfile 阅读全文
posted @ 2015-11-26 14:39 凡的世界 阅读(859) 评论(0) 推荐(0) 编辑
摘要:问题 :根据客户的需求做了一个小程序,需要有对WindowsService安装,卸载,启动,停止的操作。编译好之后在我的工程内直接Run没问题。直接在\bin\Debug点小程序运行,任何操作也没问题。由于客户要求免安装。于是我把Debug文件夹拷到桌面上运行,其他功能都ok,但是涉及到Window... 阅读全文
posted @ 2015-11-12 11:52 凡的世界 阅读(6550) 评论(0) 推荐(1) 编辑
摘要:有很多时候,我们需要创建Windows Service。 这篇文章可以算是一个入门指南吧,希望对初学者有帮助.要创建Windows Service, 首先选择Windows服务项目,如下图:这里我想创建一个Windows服务,定时的执行一些任务。public partial class Servic... 阅读全文
posted @ 2015-11-11 17:09 凡的世界 阅读(860) 评论(1) 推荐(0) 编辑
摘要:Windows服务安装异常:System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可 访问的日志: Security2种方法处理:一、右键单击“以管理员身份运行”VisualStudioCommandPrompt即可二、以管理员身份运行vs,... 阅读全文
posted @ 2015-11-11 17:08 凡的世界 阅读(11327) 评论(2) 推荐(1) 编辑
摘要:把网上两个开源的俄罗斯方块,整合到一起了,开发环境vs2012+.net 4.0,有问题、建议可以加群沟通哦复古的 c#写的一个俄罗斯方块小游戏,友好的人机交互,具体功能如下:1.游戏分七个关卡,通关后还有通关加分。2.有卡通背景图。3.有背景音乐和音效。4.有得分排行榜。5.能手动更换游戏背景图和... 阅读全文
posted @ 2015-10-30 13:58 凡的世界 阅读(3524) 评论(0) 推荐(0) 编辑
摘要:WM_* Constants and their definitions or descriptions and what can cause them to be sent. Also is a list of constants for C# and VB. 阅读全文
posted @ 2015-10-27 13:36 凡的世界 阅读(2341) 评论(0) 推荐(0) 编辑
摘要:以下是代码:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Xml;namespaceWebApplication2{//////XMLHelperXML文档操作管理器/... 阅读全文
posted @ 2015-05-12 18:19 凡的世界 阅读(2030) 评论(0) 推荐(1) 编辑
摘要:C/S程序自动升级是一个很重要的功能,原理其实很简单,一般包含两个程序一个是主程序,也就是除了升级功能以外的程序,另一个就是升级程序,常见的360,金山安全卫士都是这样。主要包括以下几点: 1 比较版本 2下载文件 3更新文件 4启动主程序。但其中的需要注意的细节很多。 一般服务端会有一个配置... 阅读全文
posted @ 2015-05-11 17:17 凡的世界 阅读(7788) 评论(1) 推荐(0) 编辑
摘要:本文假定您熟悉下列主题:Windows 窗体列表框控件Windows 窗体事件处理生成示例的步骤列表框控件提供了您需要处理的两个拖放事件:DragEnter和DragDrop。 当您在控件的边界内拖动对象时,便会发生DragEnter事件;该事件用于确定当前拖动的对象是不是您要放到控件上的对象。 在... 阅读全文
posted @ 2015-05-11 14:05 凡的世界 阅读(622) 评论(0) 推荐(0) 编辑
摘要:由于笔者正在学习WPF,所以整理出网络中部分WPF的学习资源,希望对同样在学习WPF的朋友们有所帮助。 首推刘铁猛的《深入浅出WPF》系列博文1.深入浅出WPF(1)——什么是WPFhttp://blog.csdn.net/FantasiaX/archive/2008/05/15/2449387.a... 阅读全文
posted @ 2014-10-14 09:47 凡的世界 阅读(422) 评论(0) 推荐(0) 编辑
摘要:int[]array={1,3,4,5};object[]o=(object[])System.Collections.ArrayList.Adapter((Array)array).ToArray(typeof(object));foreach(objectooino){Console.WriteLine(oo);}【lovefootball】:int[]array={1,3,4,5};obje... 阅读全文
posted @ 2009-07-24 17:50 凡的世界 阅读(648) 评论(1) 推荐(0) 编辑
摘要:关于vss在切入项目的选项从checking in 变为 checkin now(recursive) 的问题 the solution is in Tools/Options/Source Control\EnvironentUncheck the box for "Don't show check in dialog box when checking items in"详细:http://w... 阅读全文
posted @ 2009-07-09 12:16 凡的世界 阅读(304) 评论(0) 推荐(0) 编辑
摘要:private void ChangeChildren(Form frm) { //判断是否是第一次显示窗体 if (this.MdiChildren.Length == 1) { frm.Show(); return; } foreach (Form children in this.MdiChildren) { if (frm == children) { //如果是现在就存在的子窗体就激活它... 阅读全文
posted @ 2009-06-10 20:19 凡的世界 阅读(1066) 评论(0) 推荐(0) 编辑
摘要:用自定义控件 ,在构造函数中加入双缓冲 public class CustomListView : ListView { public CustomListView() { SetStyle(ControlStyles.Doubl... 阅读全文
posted @ 2009-04-18 17:25 凡的世界 阅读(1951) 评论(0) 推荐(0) 编辑
摘要:说下思路吧 下面是网上找的Use the EnumDisplayDevices() API call to enumerate the display devices on the system and look for those that don't have the DISPLAY_DEVICE_ATTACHED_TO_DESKTOP flag set (this will include ... 阅读全文
posted @ 2009-04-10 13:15 凡的世界 阅读(2669) 评论(0) 推荐(0) 编辑
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 u... 阅读全文
posted @ 2008-09-12 09:39 凡的世界 阅读(645) 评论(1) 推荐(0) 编辑
摘要:在用foreach遍历如:List 时,如果在遍历的中间对List里面的对象进行修改操作会出错,此时只能用for 阅读全文
posted @ 2008-09-11 16:47 凡的世界 阅读(390) 评论(0) 推荐(0) 编辑
摘要:新手对这个东西可能会表头痛, 下面就是添加的代码 "+"\""+" 阅读全文
posted @ 2008-09-10 19:01 凡的世界 阅读(502) 评论(0) 推荐(0) 编辑
摘要:本文描述了一个用C#实现的简单的Windows Service。 功能是在启动和停止服务的时候,在Windows事件查看器(Event Log)里添加一条log。 在Visual Studio 2008中建立Windows Service项目之后,会自动生成一个Service1的服务,它的名字默认是Service1,我先把它的文件名从Service1.cs改成ITSTestService.cs,然... 阅读全文
posted @ 2008-09-10 14:52 凡的世界 阅读(671) 评论(0) 推荐(0) 编辑