Time of Update: 2017-02-27
2.2.6 物件變數的賦值 如果兩個變數類型相同或相容,您可以把其中一個物件變數賦給另一個物件變數。例如,對象TForm1和TForm2都是從TForm繼承下來的類型,而且Form1和Form2已被說明過,那麼您可以把Form1賦給Form2:Form2
Time of Update: 2017-02-27
當使用者在多個頁面中進行切換時,程式應當保證對當前頁面進行編輯。
Time of Update: 2017-02-27
在許多程式的“關於”對話方塊中,我們常可以看到“超級連結”式的標籤,只須輕輕一點,就能立即啟動電子郵件程式給作者寫信,或者啟動瀏覽器觀看某首頁,或者遠程登入,或者自動鏈入新聞群組……如果你苦於找不到實現這些功能的Delphi控制項,又無法在協助檔案中找到相關主題,那不妨參照下文,親手一試!別看上述的“超級連結”功能繁多,其實用一條函數就能完成,那就是ShellAPI單元中的ShellExecute
Time of Update: 2017-02-27
財務軟體中總少不了大寫的金額表示方式,如下為一個簡單的小寫金額轉換為大寫的函數,其思路簡單(可以說爛吧,居然利用了位置來轉換),但是它卻幾乎可以無限制的轉換,只要你能讀得出來和寫得進去:function Tform1.SmallTOBig(small:real):string;var SmallMonth,BigMonth:string;wei1,qianwei1:string[2];wei,qianwei,dianweizhi,qian:integer;begin{-------
Time of Update: 2017-02-27
本程式介紹如何在區域網路內安裝了信差服務的Windows 2000電腦之間傳遞訊息。向表單上添加兩個TLabel組件、兩個TEdit組件和一個TButton組件,設計完成的主介面如圖1所示。圖1 主介面首先聲明NetMessageBufferSend函數,該函數在netapi32.dll庫中:type NET_API_STATUS = LongInt; function NetMessageBufferSend(servername: LPCWSTR; msgname: LPCWSTR;
Time of Update: 2017-02-27
本例效果圖:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DIB, StdCtrls;type TForm1 = class(TForm) DXPaintBox1: TDXPaintBox; Button1: TButton; Button2: TButton; procedure
Time of Update: 2017-02-27
在網路程式的設計過程中,經常需要根據得到的IP地址取得主機的名稱,本執行個體將示範如何根據使用者輸入的IP地址擷取對應主機的名稱。向表單上添加兩個TLabel組件、兩個TEdit組件和一個TButton組件,設計完成的主介面如圖1所示。圖1
Time of Update: 2017-02-27
本例效果圖:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DIB, StdCtrls;type TForm1 = class(TForm) DXPaintBox1: TDXPaintBox; Button1: TButton; Button2: TButton; procedure
Time of Update: 2017-02-27
<<Delphi6函數大全4-SysUtils.pas>>首部 function FormatFloat(const Format: string; Value: Extended): string; $[SysUtils.pas功能 返回浮點數類型以指定格式字串Format轉換成字串說明 FormatFloat(',.00', 1234567890) = '1,234,567,890.00'參考 function SysUtils.FloatToTextFmt例子
Time of Update: 2017-02-27
function WNetAddConnection2W(var lpNetResource: TNetResourceW;lpPassword, lpUserName: PWideChar; dwFlags: DWORD): DWORD; stdcall;首先要填一個 lpNetResource structure,然後 password,user name, 和一個標誌表明是否這個映射每次登入時都要還原。詳情見協助。var NRW: TNetResource;begin with NRW
Time of Update: 2017-02-27
本例效果圖:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DIB, StdCtrls;type TForm1 = class(TForm) DXPaintBox1: TDXPaintBox; Button1: TButton; Button2: TButton; procedure
Time of Update: 2017-02-27
Delphi6函數大全1-StrUtils.pas首部 function AnsiResemblesText(const AText, AOther: string): Boolean; $[StrUtils.pas功能 返回兩個字串是否相似說明 ANSI(American National Standards Institute)美國國家標準協會;不區分大小寫參考 function StrUtils.SoundexProc; var StrUtils.AnsiResemblesProc例子
Time of Update: 2017-02-27
1、在資料庫中建立如下的表用於儲存座標:ID integer //唯一編號Name string //名稱(標籤)X float //地圖座標XY float
Time of Update: 2017-02-27
1.支援XML標準,在Web上快速提交商業資訊。 Delphi簡化了資料分布、最佳化了資料交換過程。對XML的支援,使開發人員快速構建的系統具有彈性和可擴充性,以適應Internet電子商務帶來的新技術浪潮。 2.利用InternetExpress構建高速Internet應用。 Delphi
Time of Update: 2017-02-27
Internet/Intranet在九十年代可能是最流行的電腦術語了,不管是電腦行業內的人士還是電腦外的人士,都會使用Internet/Intranet,有的查資料,有的是宣傳自己和公司,甚至有許多以前從沒有想到用Internet的東西現在也在用Internet來解決,比如有的程式控制數字電腦維護用Internet來解決。在這一切應用之中,基於Web Server的應用程式的開發是基本點,但如何開發Web Server的程式呢?Delphi
Time of Update: 2017-02-27
不知道大家在使用QQ時有沒有想到它的縮入伸出的功能是如何?的呢?實現這個效果的關鍵在於如何判斷當前滑鼠指標下面的表單是不是我們的程式表單。GetCursorPos()是一個可以獲得滑鼠指標在螢幕中的座標的API函數,利用它與FindVCLWindow()的結合就可以輕易地獲得滑鼠指標下的VCL可視組件,但當一個表單中不只一個VCL可視組件,例如可能還有TPanel、TMemo等等類型時,那麼我們就必須要尋找到它們的Parent級,最終得到TForm,那就是指我們的程式表單。按照這個思路我自訂了G
Time of Update: 2017-02-27
本例效果圖:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DIB, StdCtrls;type TForm1 = class(TForm) DXPaintBox1: TDXPaintBox; Button1: TButton; Button2: TButton; procedure
Time of Update: 2017-02-27
本例效果圖:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DIB, StdCtrls;type TForm1 = class(TForm) DXPaintBox1: TDXPaintBox; Button1: TButton; Button2: TButton; procedure
Time of Update: 2017-02-27
本例效果圖:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DIB, StdCtrls;type TForm1 = class(TForm) DXPaintBox1: TDXPaintBox; Button1: TButton; Button2: TButton; Button3:
Time of Update: 2017-02-27
有人曾為公司不讓用QQ、MSN等聊天工具而煩惱嗎?看了下面的小程式你就會打消這種看法了。 當初公司做校園一卡通的項目時,裡面的機房用戶端需要用到系統的低級鍵盤鉤子WH_KEYBOARD_LL,這也是我第一次接觸到Windows中的Hook,因為WH_KEYBOARD_LL和其他鉤子不一樣,在Delphi的Windows協助以及windows.pas檔案中都沒有定義,但microsoft的msdn中確有WH_KEYBOARD_LL的介紹,所以一路解決後就對Windows的系統鉤子產生了興趣。之後