Time of Update: 2018-07-18
原文地址:http://blog.csdn.net/knight94/archive/2006/03/18/628285.aspx 很多人都苦惱於如何在子表單中操作主表單上的控制項,或者在主表單中操作子表單上的控制項。相比較而言,後面稍微簡單一些,只要在主表單中建立子表單的時候,保留所建立子表單對象即可。 下面重點介紹前一種,目前常見的有兩種方法,基本上大同小異: 第一種,在主表單類中定義一個靜態成員,來儲存當前主表單對象,例如:
Time of Update: 2018-07-18
/// <summary> /// 價格和數量輸入控制(只能輸入一個小數點,小數點後只能輸入兩位,第一位不能是小數點) /// </summary> /// <param name="e">KeyPressEventArgs e</param> /// <param name="textBox">TextBox</param> public static void
Time of Update: 2018-07-18
using System;using System.Collections;public class MyClass{public static void Main(){DateTime dt1 = DateTime.Parse("2006-04-01");DateTime dt2 = DateTime.Parse("2006-05-01");TimeSpan ts =
Time of Update: 2018-07-18
1、配置log4net.config <appender name="BaseLog" type="log4net.Appender.RollingFileAppender"><file value="LogFiles\Base\" /> </appender> <logger name="MyLog.Base.Log"><level
Time of Update: 2018-07-18
http://www.51zxw.net/study.asp?vip=1368926 一個完整windows 服務原始碼下載地址 開發環境 vs 2010 (但方法適用於VS2005 及 VS 2008)c++ atl 版 在編譯出exe以後使用release下的批處理安裝卸載服務在windows裡的服務控制台進行服務的啟動和停止操作本程式是完整的windows 服務開發架構,直接在裡面添加業務代碼就可以產生一個標準的服務程式 帶有一個記錄檔
Time of Update: 2018-07-18
一,comboBox(from:http://hi.baidu.com/anymis/blog/item/89c1dd3d25c149c79f3d62b3.html) c# 中combobox綁定資料為combobox綁定資料其資料來源通常為DataTable這個綁定相對較易,
Time of Update: 2018-07-18
什麼是泛型 我們在編寫程式時,經常遇到兩個模組的功能非常相似,只是一個是處理 int資料,另一個是處理 string資料,或者其他自訂的資料類型,但我們沒有辦法,只能分別寫多個方法處理每個資料類型,因為方法的參數類型不同。有沒有一種辦法,在方法中傳入通用的資料類型,這樣不就可以合并代碼了嗎。泛型的出現就是專門解決這個問題的。讀完本篇文章,你會對泛型有更深的瞭解。 為什麼要使用泛型 為了瞭解這個問題,
Time of Update: 2018-07-18
#include "stdafx.h" #include "stdio.h" #include "stdlib.h" #include "malloc.h" typedef struct LNode { int data;
Time of Update: 2018-07-18
#include "stdafx.h" #include <stdlib.h> #include <stdio.h> typedef struct node { int data; struct node* next;
Time of Update: 2018-07-18
#include "stdafx.h" #include "stdio.h" #include "stdlib.h" typedef struct List { int data; struct List *next;
Time of Update: 2018-07-18
【資料收集自網路】 在DataGridView的CellPainting事件中,加入如下代碼 private void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) { if (e.RowIndex >= 0 && e.ColumnIndex == -1) { Rectangle
Time of Update: 2018-07-18
聲明:本文根據網路資料,改編而成 1.FormBase介面:有“協助,上一步,下一步,取消”按鈕,這些按鈕放置在一個Panel上。 namespace DataBase { public partial class FormBase : Form {
Time of Update: 2018-07-18
volatile是C#中用於控制同步的關鍵字,其意義是針對程式中一些敏感性資料,不允許多線程同時訪問,保證資料在任何訪問時刻,最多有一個線程訪問,以保證資料的完整性,volatile是修飾變數的修飾符。 1、volatile的使用情境
Time of Update: 2018-07-18
將現有檔案複製到新檔案,不允許改寫現有檔案。[C#] public FileInfo CopyTo(string);將現有檔案複製到新檔案,允許改寫現有檔案。[C#] public FileInfo CopyTo(string, bool);[C#] 將檔案複製到指定路徑,允許改寫同名的目標檔案 COPY using System; using System.IO; class Test { public static
Time of Update: 2018-07-18
#include "stdafx.h" #include <iostream> using std::cout; using std::cin; using std::endl; void factorial(int x){ int re[100
Time of Update: 2018-07-18
最近在用VS2013寫程式,把編譯好的exe在別人的電腦上運行就會出現缺少msvcp檔案不能啟動並執行情況。在網上搜了一下,問題原因如下: C/C++程式運行時需要標準庫的支援,Windows下為msvcrt.dll(C運行時)和msvcp(C++運行時),Linux下為libc.so和libstdc++.so。Windows XP裡面內建VC 6.0的運行時,如果用VC 6編譯的話可以正常運行。VS 2013的運行時必須額外安裝,也就是vc2013
Time of Update: 2018-07-18
int _tmain(int argc, _TCHAR* argv[]) { int i,j,a[10][10]; //i表示行,j表示列
Time of Update: 2018-07-18
C#多語言程式開發 【部分資料源自網路】 1,建立一個C#項目,在Form1上拖拉一個Button名為button1 2.將button1的Text屬性設定為: "這是中文" 3.在設計介面Form1的屬性裡找到Language,選擇到英語 4.將button1的Text屬性設定為: "This is English"
Time of Update: 2018-07-18
我第一年的C++學習之路 —— C++學習方法不斷轉變 兩本讓我提升的書: 對於C++,我首先想要講講的是《C++ Primer Plus》與《C++ Primer》這兩本書,很多人討論過,對比過這兩本書有些什麼不同,適合哪些人學習之類的問題,而我,已將《C++ Primer Plus》全部看完,看了《C++ Primer》兩大部分內容,現,就個人吧,想講講我對這兩本書有些什麼樣的感受。 開始接觸C++:
Time of Update: 2018-07-18
在C#裡,有三個Timer類:1.System.Windows.Forms.Timer 2.System.Threading.Timer 3.System.Timers.Timer System.Windows.Forms.Timer是應用於WinForm中的,它是通過Windows訊息機制實現的,類似於VB或 Delphi中的Timer控制項,內部使用API SetTimer實現的。它的主要缺點是計時不精確,而且必須有訊息迴圈,Console