Time of Update: 2017-02-28
Timer組件是也是一個WinForm組件了,和其他的WinForm組件的最大區別是:Timer組件是不可見的,而其他大部分的組件都是都是可見的,可以設計的。Timer組件也被封裝在名稱空間System.Windows.Forms中,其主要作用是當Timer組件啟動後,每隔一個固定時間段,觸發相同的事件。Timer組件在程式設計中是一個比較常用的組件,雖然屬性、事件都很少,但在有些地方使用它會產生意想不到的效果。 本文介紹的程式,是用Visual
Time of Update: 2017-02-28
1.替換目標字串中的url 成為超連結using System;using System.Text.RegularExpressions;namespace ArLi.CommonPrj{ public class ReplaceLink { public ReplaceLink() { } /// <summary>替換目標字串中的url 成為超連結</summary> /// <param
Time of Update: 2017-02-28
excel 首先是如何建立、開啟、讀取、寫入、儲存的一般性代碼:using System;using System.Reflection;namespace CExcel1{ class Class1 { [STAThread] static void Main(string[] args) {//建立Application對象 Excel.Application xApp=new Excel.ApplicationClass();
Time of Update: 2017-02-28
js|字串 今天在論壇裡面逛發現一個問題比較典型,我們在使用js的時候可以直接使用Eval得到某一個運算式的值,在C#裡面可以嗎?答案是肯定的,在.NET提供的豐富的類庫裡面這是可以實現的,但是沒有js那麼簡單下面我將使用一個簡單的例子來說明利用編譯器和反射得到一個字串運算式的值。我們建立一個Windows表單裡面有如下的方法:引用一下命名空間:using System;using System.Text;using System.CodeDom.
Time of Update: 2017-02-28
控制 一、控制結構首先瞭解比較子:== 等於 >= 大於等於 <=小於等於 > 大於 < 小於 != 不等於瞭解邏輯運算子:&& 邏輯AND || 邏輯OR ! 邏輯NOT警告:執行順序是:! && ||if...else...結構:第一方式:if(){};第二方式:if(){}else{};第三方式:if(){}else if(){}else if(){};第四方式:if(){}else if(){}else
Time of Update: 2017-02-28
Ted GraHam 提到了39 條 CheckList, 我覺得還是總結的挺全面.Are exceptions used to indicate error rather than returning status or error codes? 使用異常來只是錯誤而不是使用狀態或者錯誤碼值 Are all classes and public methods commented with .NET style comments?? Note that comments should
Time of Update: 2017-02-28
excel 在做一個小項目,需要把一些查詢結果匯出到Excel,找了一些資料,自己也總結出了一點方法,與大家共用。一、首先簡要描述一下如何操作Excel表先要添加對Excel的引用。選擇項目-〉添加引用-〉COM-〉添加Microsoft Excel 9.0。(不同的office講會有不同版本的dll檔案)。using Excel;using
Time of Update: 2017-02-28
visual|多線程
Time of Update: 2017-02-28
轉換 在.NET Framework中,System.Convert類中提供了較為全面的各種類型、數值之間的轉換功能。其中的兩個方法可以輕鬆的實現各種進位的數值間的轉換:Convert.ToInt32(string value, int
Time of Update: 2017-02-28
編程|初學 我始終認為,對一個初學者來說,IT界的技術風潮是不可以追趕的,而且也沒有能力去追趕。我時常看見自己的DDMM們把課本扔了,去賣些價格不菲的諸如C#, VB.Net 這樣的大部頭,這讓我感到非常痛心。而許多搞不清指標是咋回事的BBS站友眉飛色舞的討論C#裡面可以不用指標等等則讓我覺得好笑。C#就象當年的ASP一樣,“忽如一夜春風來,千樹萬樹梨花開”,結果許多學校的資訊學院成了“Web 學院”。96,97級的不少大學生都去做Web
Time of Update: 2017-02-28
問題|壓縮
Time of Update: 2017-02-28
正則 想必很多讀者都寫過給程式碼按文法著色的程式。而這在一段時間以前是一件很困難的事。你需要寫大量程式碼分析文法——而這往往又是最困難的部分。直到,Regex(Regular Expression)的出現,我們才可以從繁重的工作中解脫。Regex提供了一系列方法(標準、模式),使我們能夠高效地建立、比較和修改字串,以及迅速地分析大量文本和資料以搜尋、移除和替換文字模式 [1] 。DotNET Framework 提供了
Time of Update: 2017-02-28
接著第一篇文章,繼續,這是在FrMain.cs檔案中除了第一篇文章裡的代碼外的第二部分: //******************************* #region 建立自訂工具,用來測量距離(可以折線)和測量面積 //****************************888 private void mapMain_PolyToolUsed(object sender, AxMapXLib.CMapXEvents_PolyToolUsedEvent e)
Time of Update: 2017-02-28
控制項 自己動手用c#寫控制項 willsound(willsound@163.com) 關鍵詞c#,.net,控制項,GDI+
Time of Update: 2017-02-28
window|訪問 using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Management;using System.Text;using
Time of Update: 2017-02-28
Generics in C# Generics are the most useful C# 2.0 language extensions, beside Anonymous methods, Iterators, Partial types And Nullable types.What are generics?Generics permit classes, structs, interfaces, delegates, and methods to be parameterized
Time of Update: 2017-02-28
server 一、委託的簡介1、委託的聲明:<access modifier> delegate <returnType> HandlerName ([parameters])例如:public delegate void PrintHandler(string str);
Time of Update: 2017-02-28
編程|規範 續之一,小雞射手接著翻譯了IDesign編碼規範的第二章前部。2 編碼慣例 Coding Practices 1. 避免在一個檔案中放多個類。 Avoid putting multiple classes in a single file. 2. 一個檔案應該只對一個命名空間提供類型。避免在同一檔案中有多個命名空間。 A single file should only contribute types to a
Time of Update: 2017-02-28
web|web服務|web伺服器 個人珍藏,僅為存檔.今天整理磁碟,沒處放.扔BLOG.看不懂,別問我.自己研究.webserver.csnamespace cnnbsun.webserver{using System; using System.IO;using System.Net;using System.Net.Sockets;using System.Text;using System.Threading ;class
Time of Update: 2017-02-28
C# 繪圖--飄帶楊賀宏 //-------------------------------------// DrawStreamer.cs by Flycrane//------------------------------------- using System; using System.Drawing; using System.Windows.Forms; class DrawStreamer : Form { publicstaticvoidMain() {