· 当你设计一个应用程序时,或许你希望用户能够通过客户区来拖动窗体,比如:当窗体没有标题栏或创建的是不规则的窗体时,就只有通过客户区来拖动窗体了。一个发生在我们身边很好的例子就是Microsoft Windows Media Player。Media Player有项功能是根据用户的爱好可以随意换掉外观(换肤),这个时候...
· 下面的示例显示如何使用 Socket 类向 HTTP 服务器发送数据和接收响应。[C#]
public string DoSocketGet(string server)
{//Sets up variables and a string to write to the serverEncoding ASCII = Encoding.ASCII;string Get = "GET / HTTP/1.1\r\nHost: " + server + "\r\nCon...
· //需要引用System.Windows.Forms名称空间
string languageName="五笔";//查找第一个五笔输入法
foreach(InputLanguage l in InputLanguage.InstalledInputLanguages)
{if(l.LayoutName.IndexOf(languageName)>=0){InputLanguage.CurrentInputLanguage=l;break;}
}
· Implementing the Singleton Pattern in C#
view auther's websiteThe singleton pattern is one of the best-known patterns in software engineering. Essentially, a singleton is a class which only allows a single instance of itself to be created, and usually gives simple access to t...
· Technotes, HowTo Series
C# Coding Style Guide
Version 0.3
by Mike Krüger icsharpcode.netAbout the C# Coding Style Guide
File Organization
Indentation
Comments
Declarations
Statements
White Space
Naming Conventions
Programming Practices
Code Examples
1. About th...
· Introduction to C# 2.0
C# 2.0 introduces several language extensions, the most important of which are Generics, Anonymous Methods, Iterators, and Partial Types.C#2.0 介绍几种语言扩展,泛型,匿名方法,迭代器 和、partial Types.· Generics permit classes, structs, in...
· using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Security.Cryptography;
using System.IO;namespace 对称加密应用
{/// /// Form1 的摘要说明。/// public class Form1 : System.Wind...
· How to handle events in word by using Visual C# .NET
适用于
IN THIS TASKSUMMARY Recognize events that are supported by word 2000, by word 2002, and by word 2003 Recognize events that are supported by word 2002 and by word 2003 Recognize events that are supported by word 2003...