Time of Update: 2018-12-07
測試簡圖:功能簡介:1、雙擊左視窗可開啟源映像;2、框選左視窗可把映像選取複製到右視窗;3、剪取的圖塊可以移動, 可配合 Ctrl 單選或多選, 可用 Delete 刪除選擇的圖塊;4、雙擊右視窗可儲存拼好的映像.功能實現:1、MoveImage 主要完成 "圖塊" 的功能;2、ImageBox 主要完成源映像及選取功能;3、其他有主模組 Unit1 完成.表單:object Form1: TForm1 Left = 0 Top = 0 Caption = 'Form1'
Time of Update: 2018-12-07
1引言Windows Sockets規範以U.C. Berkeley大學BSD UNIX中流行的Socket介面為範例定義了一套Microsoft Windows下網路編程介面。它不僅包含了人們所熟悉的Berkeley Socket風格的庫函數;也包含了一組針對Windows的擴充庫函數,以使程式員能充分地利用Windows訊息驅動機制進行編程。Windows Sockets
Time of Update: 2018-12-07
Non-blocking串連,讀和寫是非同步, 所以在你的網路應用中不需要阻塞其他代碼的執行.建立一個Non-blocking串連: 1.在客戶socket中設定ClientType屬性為ctNonBlocking. 2.在伺服器socket中設定ServerType屬性為stNonBlocking. 讀和寫操作事件
Time of Update: 2018-12-07
代碼複用規則1、 對介面編程2、 優先使用對象組合,而不是類繼承3、 將可變的部分和不可變的部分分離 抽象基類中定義好不可變的部分,而由其子類去具體實現可變的部分,不可變的部分不需要重複定義4、
Time of Update: 2018-12-07
.IF、.ELSEIF、.ELSE、.ENDIF: 條件偽指令;可以使用和 C 語言類似的條判斷:a == ba != ba > ba >= ba ; Test30_1.asm.386.model flat, stdcallinclude windows.incinclude kernel32.incinclude masm32.incinclude debug.incincludelib kernel32.libincludelib
Time of Update: 2018-12-07
結構和聯合分別用 struct、union 定義, 都是 ends 結束定義.它們使用方法相同, 並可以互相嵌套; 主要區別是後者的各成員共用同一個地址.結構樣本:; Test31_1.asm.386.model flat, stdcallinclude windows.incinclude kernel32.incinclude masm32.incinclude debug.incincludelib kernel32.libincludelib
Time of Update: 2018-12-07
//取十六進位字串第n位元組值 位元組之間有個空格function AGetByteAt(HexValue:string; n:integer):string;begin Result:=Copy(HexValue,(n-1)*3+1,2);end; //取十六進位字串從第n位元組開始的連續m個位元組 位元組之間有個空格function AGetHexSubstr(HexValue:string; n, m : integer):string;var i: Integer; temp:
Time of Update: 2018-12-07
DELPHI能夠相容COM的資料類型,反之,則不成立。在此舉個簡單的例子://DELPHIprocedure Tyn.save2(data: olevariant; out errcount: integer);begin dspunit.ApplyUpdates(data, 0, errcount);end;//COMprocedure Tyn.save(data: OleVariant; out errCount: SYSINT);begin save2(data, errcount)
Time of Update: 2018-12-07
ListView使用中的一些要點。以下以一個兩列的ListView為例。 →增加一行:with ListView1 do begin ListItem:=Items.Add; ListItem.Caption:='第一列內容'; ListItem.SubItems.Add('第二列內容'); end; →清空ListView1:ListView1.Items.Clear; →得到當前被選中行的行的行號以及刪除當前行:For i:=0 to
Time of Update: 2018-12-07
Blocking connections 當你使用的串連是Blocking時,你的Socket必須通過串連發起讀或寫操作,勝過被動的等待從socket串連發來的通知. 當你的串連末端的讀和寫操作發生改變時使用Blocking socket.對於用戶端sockets,設定ClientType屬性為ctBlocking 以便構成一個blocing
Time of Update: 2018-12-07
Sender,Self,Owner,parent
Time of Update: 2018-12-07
擷取當前系統版本號碼 unit WinVerUtils;{#===============================================================================# Name: WinVerUtils.pas# Author: Aleksander Oven# Created: 2007-02-25# Last Change: 2007-02-25# Version: 1.0#
Time of Update: 2018-12-07
模組定義
Time of Update: 2018-12-07
問題來源: http://www.cnblogs.com/del/archive/2010/04/21/1717584.html#1809298//方法 1: 共用記憶體procedure TForm1.Button1Click(Sender: TObject);var bf: record b1,b2,b3,b4: Byte end; i: Integer absolute bf;begin bf.b1 := $CC; bf.b2 := $DD; bf.b3 := $EE; bf.
Time of Update: 2018-12-07
問題來源: http://www.cnblogs.com/del/archive/2008/09/11/1288760.html#1807074本話題會涉及到: Lo、Hi、HiByte、LoWord、HiWord、MakeWord、MakeLong、Int64Rec譬如有一個 Cardinal 類型的整數: 1144201745其十六進位的表示是: $44332211其二進位表示是: 01000100 00110011 00100010 00010001我們說 Cardinal 是 32
Time of Update: 2018-12-07
有序類型的大小及最大、最小值 procedure TForm1.Button1Click(Sender: TObject);var b: Byte; w: Word; i: Integer; c: Cardinal;begin ShowMessage(IntToStr(SizeOf(b))); //Byte大小:1 ShowMessage(IntToStr(High(b))); //Byte最大值: 255 ShowMessage(IntToStr(Low(b)));
Time of Update: 2018-12-07
procedure CreateVarArrayFromDataset(var varResultSet: OleVariant; ADataset : TDataset); var m : Integer; nRecords, nColumns, nCurRec : Integer; begin nRecords := -1; nColumns := -1; try { Create the
Time of Update: 2018-12-07
1.HexToBin() 十六進位轉換二進位所在單元:ClassesDelphi文法:function HexToBin(Text, Buffer: PChar; BufSize: Integer):
Time of Update: 2018-12-07
IT之禪(一)
Time of Update: 2018-12-07
Delphi關於多線程同步的一些方法 線程是進程內一個相對獨立的、可調度的執行單元。一個應用可以有一個主線程,一個主線程可以有多個子線程,子線程還可以有自己的子線程,這樣就構成了多線程應用了。由於多個線程往往會同時訪問同一塊記憶體地區,頻繁的訪問這塊地區,將會增加產生線程衝突的機率。一旦產生了衝突,將會造成不可預料的結果(該公用地區的值是不可預料的)可見處理線程同步的必要性。 注意:本文中出現的所有代碼都是用DELPHI描述的,調試環境為Windows me ,Delphi