Time of Update: 2018-12-06
CS_HREDRAW 如果視窗客戶區寬度發生改變,重繪整個視窗 CS_VREDRAW 如果視窗客戶區高度發生改變,重繪整個視窗 CS_DBLCLKS 能感受使用者在視窗中的雙擊訊息 CS_NOCLOSE 禁用系統功能表中的“關閉”命令 CS_OWNDC 為該視窗類別的各視窗分配各自獨立的裝置環境 CS_CLASSDC 為該視窗類別的各視窗分配一個共用的裝置環境 CS_PARENTDC 指定子視窗繼承其父視窗的裝置環境
Time of Update: 2018-12-06
從Visual Studio.Net2003開始,微軟的.Net開發平台就吸引了很多的編程的專業人員和愛好者。當微軟的Visual
Time of Update: 2018-12-06
//region 字串截取函數//首先引入System.Text命名空間 public static string CutString(string inputString,int len) { ASCIIEncoding ascii = new ASCIIEncoding(); int tempLen=0; string tempString=""; byte[] s =
Time of Update: 2018-12-06
Flex MXML+as3 VS WPF XAML+c# Object-->EventDispatcher-->DisplayObject-->Spirit-->MovieClipFlex Framework 與 Microsoft WPF是非常像的,都是用各自專屬的相關XML文法來表達介面。WPF的是XAML ,
Time of Update: 2018-12-06
如大家要轉載,請保留本人的著作權:/* *Description:C#.NET使用NHibernate 1.0 XML映射使用中容易出錯的地方全程記錄 *Auther:天很藍_崇崇 *MSN:chongchong2008@msn.com *Dates:2005-12-14 *Copyright:ChongChong2008 YiChang HuBei China */ 1 資料庫中是bit類型的資料 hbm.xml對應檔中的類型可以為Int32 或是
Time of Update: 2018-12-06
1. 關於執行個體方法內self的使用, ObjC比較特殊. 比如下例子, self.name 實際上會訪問 property name,而不是直接存取內部變數,也就是說會訪問
Time of Update: 2018-12-06
這個模式好像經常有人拿來談論,我覺得理論意義比實際意義要大,所以列出三種寫法,看著玩兒吧. 1. 普通寫法 using System;public class Singleton{ private static Singleton instance; private Singleton() {} public static Singleton Instance { get { if (instance == null) {
Time of Update: 2018-12-06
1.簡介 虛函數是C++中用於實現多態(polymorphism)的機制。核心理念就是通過基類訪問衍生類別定義的函數。假設我們有下面的類層次:class A{public: virtual void foo() { cout << "A::foo() is called" << endl;}};class B: public A{public: virtual void foo() { cout << "B::foo() is
Time of Update: 2018-12-06
/******************************************************************** created: 2008/04/16 created: 16:4:2008 11:07 filename: F:\Workspace\Midapex\Src\Net\OurFtpServer\Program.cs file path: F:\Workspace\Midapex\Src\Net\OurFtpServer file
Time of Update: 2018-12-06
網站的項目(.NET 2.0)中使用了memcached作為主要快取服務,好處就不講了。目前使用的還是EnyimMemcached,也發現幾個問題,但是自從07年8月,作者就沒有再更新,本來xingd準備自己著手改寫的。前幾天正好出了一個新的C#用戶端——BeIT Memcached,這個用戶端是基於2007-12-06發布的memcached
Time of Update: 2018-12-06
C#提供了Mutex與Interlocked這兩個與線程相關的類,都在Threading命名空間下~! Mutex中提供了WiteOne,ReleaseMutex 兩個執行個體方法~ WiteOne的作用是"阻塞當前線程,提供對該線程的原子操作" 也就是說當一個線程遇到WiteOne的時候,如果在WiteOne裡面沒有線程在操作,則此線程進去操作 而裡面有線程的時候,所有到此的線程均需要排隊等候裡面的線程執行完畢~ 而控制這樣操作的結束標記就是使用ReleaseMutex 方法!
Time of Update: 2018-12-06
很多人都苦惱於如何在子表單中操作主表單上的控制項,或者在主表單中操作子表單上的控制項。相比較而言,後面稍微簡單一些,只要在主表單中建立子表單的時候,保留所建立子表單對象即可。 下面重點介紹前一種,目前常見的有兩種方法,基本上大同小異: 第一種,在主表單類中定義一個靜態成員,來儲存當前主表單對象,例如: public static yourMainWindow pCurrentWin = null;
Time of Update: 2018-12-06
//獲得連結 public ArrayList GetHyperLinks(string htmlCode) { ArrayList al = new ArrayList(); string strRegex = "<a(.|\n)+?>"; int startp, endp; Regex r = new
Time of Update: 2018-12-06
visual studio 2005 + winxp sp2 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using
Time of Update: 2018-12-06
在介面上添加Label1 textBox1 Button1 Button2 timer1 並設定timer1.Enable=false interval可以先設定10000,運行時憑感覺再適當縮小private void timer1_Tick(object sender, System.EventArgs e) { KillProcess("IEXPLORE"); Process.Start("IExplore.exe", textBox1.Text);
Time of Update: 2018-12-06
1、DateTime 數字型 System.DateTime currentTime=new System.DateTime(); 1.1 取當前年月日時分秒 currentTime=System.DateTime.Now; 1.2 取當前年 int 年=currentTime.Year; 1.3 取當前月 int 月=currentTime.Month; 1.4 取當前日 int 日=currentTime.Day; 1.5 取當前時 int 時=currentTime.Hour; 1.6
Time of Update: 2018-12-06
方法一: string weekstr = DateTime.Now.DayOfWeek.ToString(); switch (weekstr) { case "Monday": weekstr = "星期一"; break; case "Tuesday": weekstr = "星期二"; break; case "Wednesday": weekstr = "星期三"; break;
Time of Update: 2018-12-06
可以對http最終輸出內容做任意的替換,代碼如下: using System; using System.Collections; using System.Configuration; using System.Text.RegularExpressions; using System.Web; using System.Xml; using System.Xml.Serialization; using System.IO; using System.Text;
Time of Update: 2018-12-06
public string checkStr(string html) { System.Text.RegularExpressions.Regex regex1 = new System.Text.RegularExpressions.Regex(@"<script[\s\S]+</script *>", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
Time of Update: 2018-12-06
最常見的調用com組件的方法就是添加對這個組件的引用,但是這會在最終可執行檔邊產生一個伴隨的dll如MyCom.Interop.dll等,這給程式的分髮帶來相當程度的不便,而且添加引用是我們只能引用某個特定版本的com組件,而我們往往無法確定程式所啟動並執行機器上是否有相應版本的com組件,這可能造成我們的程式無法運行。我們要如何解決這個問題呢?