Time of Update: 2018-12-07
{location 對象:}reload //重新載入當前文檔replace //用新的文檔替換當前文檔assign //載入新文檔href //設定或返回完整的 URLprotocol //設定或返回當前 URL 的協議host //設定或返回 # 號開始的 URL(錨)hostname //設定或返回當前 URL 的主機名稱port //設定或返回當前 URL 的連接埠號碼pathname //設定或返回當前 URL 的路徑部分search
Time of Update: 2018-12-07
雖是半路出家, 但也接觸了幾種程式設計語言(主要是 Delphi), 面對未知的程式語言也不再神秘了.所有這些語言, 最終都會編譯成另一種語言(二進位的機器碼)去和機器交流; 因為人們很難識別只有 0、1 構成的機器碼, 所以才有了彙編、彙編還是有點麻煩所以才有了 Delphi 等進階語言, 說起來進階語言已經不算難了.所謂某種語言的功能強大, 其實是 "庫" 的強大, 就像 Delphi 強大在 VCL 庫一樣.比 VCL 更強大的庫是 Windows API, 這好像不屬於 Delphi,
Time of Update: 2018-12-07
{IHTMLDocument2 方法:}write //寫入writeln //寫入並換行open //開啟一個流,以收集 document.write 或 document.writeln 的輸出close //關閉並輸出用 document.open 方法開啟的流clear //清空文檔中所有元素,
Time of Update: 2018-12-07
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure
Time of Update: 2018-12-07
問題來源: http://www.cnblogs.com/del/archive/2009/03/18/1410030.html#1480550本例:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton;
Time of Update: 2018-12-07
問題來源: http://www.cnblogs.com/del/archive/2009/03/21/1410030.html#1483614{轉換 TBytes 到 Integer}procedure TForm1.Button1Click(Sender: TObject);var bs: TBytes; {TBytes 就是 Byte 的動態數組} i: Integer;begin {它應該和 Integer 一樣大小才適合轉換} SetLength(bs, 4); bs[0]
Time of Update: 2018-12-07
CompareDateTime、CompareDate、CompareTime 返回的是 -1、0、1;前者 = 後者: 返回 0;前者 > 後者: 返回 1;前者 SameDateTime、SameDate、SameTime 返回的是 True 和 False.unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;type
Time of Update: 2018-12-07
{從字串中提取單詞的函數}procedure StrToWordList(str: string; var List: TStringList);var p: PChar; i: Integer;begin if List = nil then List := TStringList.Create; List.Clear; {去除重複} List.Sorted := True; List.Duplicates := dupIgnore; p := PChar(str); {
Time of Update: 2018-12-07
它們的參數都是一個 TDateTime, DateOf、TimeOf 分別提取日期與時間, 並返回 TDateTime 類型;YearOf、MonthOf、WeekOf、DayOf、HourOf、MinuteOf、SecondOf、MilliSecondOf 返回的都是 Word 類型.unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Time of Update: 2018-12-07
一句話: 用 CompareMem 對比記憶體即可.{對比靜態數組}procedure TForm1.Button1Click(Sender: TObject);var arr1: array[0..3] of AnsiChar; arr2: array[0..3] of Byte;begin arr1[0] := 'A'; arr1[1] := 'B'; arr1[2] := 'C'; arr1[3] := 'D'; arr2[0] := 65; arr2[1] := 66;
Time of Update: 2018-12-07
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure
Time of Update: 2018-12-07
SysUtils.DayOfWeek();DateUtils.MonthOfTheYear();DateUtils.WeekOfTheYear();DateUtils.WeekOfTheMonth();DateUtils.NthDayOfWeek();DateUtils.DayOfTheYear();DateUtils.DayOfTheMonth();DateUtils.DayOfTheWeek();DateUtils.SysUtils.DayOfWeek();DateUtils.HourOfT
Time of Update: 2018-12-07
這是在頁面下載完畢後即刻擷取:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, OleCtrls, SHDocVw, StdCtrls;type TForm1 = class(TForm) WebBrowser1: TWebBrowser; Button1: TButton; Button2:
Time of Update: 2018-12-07
本例:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, CheckLst;type TForm1 = class(TForm) CheckListBox1: TCheckListBox; Button1: TButton; Edit1: TEdit; procedure
Time of Update: 2018-12-07
舉例: 更換案頭壁紙var BmpPath: PChar;begin BmpPath := 'C:\Temp\Test.bmp'; SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, BmpPath, SPIF_UPDATEINIFILE);end;SystemParametersInfo 的參數實在太多了...SPI_GETBEEP = 1; {}SPI_SETBEEP
Time of Update: 2018-12-07
問題來源: http://www.cnblogs.com/del/archive/2009/03/15/1410030.html#1477217unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton;
Time of Update: 2018-12-07
本例:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, OleCtrls, SHDocVw, StdCtrls, ExtCtrls;type TForm1 = class(TForm) WebBrowser1: TWebBrowser; Panel1: TPanel; Button1:
Time of Update: 2018-12-07
DateUtils.YearsBetween();DateUtils.MonthsBetween();DateUtils.WeeksBetween();DateUtils.DaysBetween();DateUtils.HoursBetween();DateUtils.MinutesBetween();DateUtils.SecondsBetween();DateUtils.MilliSecondsBetween();DateUtils.YearSpan();DateUtils.MonthSpa
Time of Update: 2018-12-07
問題來源: http://www.cnblogs.com/del/archive/2009/03/15/1412384.html#1477470unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls;type TForm1 = class(TForm) Button1: TButton;
Time of Update: 2018-12-07
實現原理: 對比二進位位.unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Memo1: TMemo; procedure Button1Click(Sender: TObject);