WinAPI: 測試 BitBlt

BitBlt( DestDC: HDC; {目標 DC} X, Y, Width, Height: Integer; {目標位置與大小} SrcDC: HDC; {源 DC} XSrc, YSrc: Integer; {源起始位置} Rop: DWORD {光柵作業碼, 也就是源像素與目標像素的混合方式}): BOOL;//可以使用光柵作業碼的函數還有:

WinAPI: DrawTextEx – 多功能文本繪製

//聲明:DrawTextEx( DC: HDC; {裝置控制代碼} lpchText: PChar; {文本} cchText: Integer; {要繪製的字元個數; -1 表示全部} var p4: TRect; {矩形結構} dwDTFormat: UINT; {選項} DTParams: PDrawTextParams {附加參數, 指向一個

WinAPI: ShellExecute – 開啟外部程式或檔案

ShellExecute( hWnd: HWND; {指定父視窗控制代碼} Operation: PChar; {指定動作, 譬如: open、print} FileName: PChar; {指定要開啟的檔案或程式} Parameters: PChar; {給要開啟的程式指定參數; 如果開啟的是檔案這裡應該是 nil} Directory: PChar; {預設目錄} ShowCmd: Integer {開啟選項}): HINST;

刪除或添加最大化、最小化按鈕 – 回複 “Tommy the CAT” 的問題

問題來源: http://www.cnblogs.com/del/archive/2008/07/02/1202871.html#1242042本例:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton;

WinAPI: WinExec – 運行外部程式

//聲明WinExec( lpCmdLine: LPCSTR; {檔案名稱和參數; 如沒指定路徑會按以下順序尋找: 程式目錄/目前的目錄/System32/Windows/PATH環境變數} uCmdShow: UINT {啟動選項}): UINT;//傳回值:大於 31 {調用成功}等於 0 {記憶體不足}ERROR_FILE_NOT_FOUND = 2; {檔案名稱錯誤}ERROR_PATH_NOT_

給 Memo 排序的函數

本例:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Memo1: TMemo; Button1: TButton; procedure Button1Click(Sender: TObject);

結構化檔案存取

綱要:AssignFile: 關聯 Rewrite: 建立並開啟一個新檔案, 如已存在則覆蓋 Reset: 開啟已存在的檔案; 追加也要用它先開啟, 然後再移動指標; Append 是文字檔專用的 CloseFile: 關閉FileSize: 記錄數 FilePos: 返迴文件的當前位置 Seek: 把檔案指標移到指定位置(只用於結構化檔案) Eof: 檔案尾Read: 讀 Write: 寫另外: 包含長字串、變數、類執行個體、介面或動態數組的記錄不能寫入類型檔案中!//操作樣本:unit

用 API 實現的擷取文本容器中選擇的文本 – 回複 “roy.flex” 的問題

問題來源: http://www.cnblogs.com/del/archive/2008/06/18/1083011.html#1229305告訴 roy.flex 同學: 你的問題還是挺複雜的, 先要完成的就是這一步; 再往下做, 如果要捕獲其他程式中的滑鼠需要做 DLL; 不過還有個簡單辦法, 就是用 TTimer 定時擷取, 這樣也就不用鉤子了; 但是還需要知道要操作對象的控制代碼, 這個可以參考: http://www.cnblogs.com/del/archive/2008/03/0

學習官方樣本 – TApplication.CreateForm

本例源碼下載, 運行:製作過程:1、建立工程後, 再添加 Form2、Form3、Form4、Form5;2、在 Form5 上分別添加一個 TProgressBar、TLabel(使用預設名稱);3、開啟工程源碼(Project -> View Source), 貼入以下檔案後運行.program Project1;uses Forms, SysUtils, Unit1 in 'Unit1.pas' {Form1}, Unit2 in 'Unit2.pas' {Form2},

學習官方樣本 – TApplication.ExeName

本例包含用 TFileStream 複製檔案和用 ShellAPI.ShellExecute 開啟檔案夾的方法.本例:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Edit1: TEdit; Edit2: TEdit;

用 TClientDataSet 建立 XML 檔案的過程 – 回複”丁永其”的問題

問題來源: http://www.cnblogs.com/del/archive/2008/06/12/1114450.html#1223758本例:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, DB, DBClient;type TForm1 = class(TForm)

學習官方樣本 – TApplication.Icon

本例同時包含了 TOpenPictureDialog 控制項的一些用法.代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtDlgs, StdCtrls;type TForm1 = class(TForm) OpenPictureDialog1: TOpenPictureDialog;

關於動畫移動矩形的例子 – 回複 “ps8.0″ 同學

問題來源: http://www.cnblogs.com/del/archive/2008/06/12/1131232.html#1224216首先, 實現這個問題有兩種方法:1、邊擦邊畫; 2、先在記憶體繪圖然後再複製到前台, 就是所謂的雙倍緩衝.本例使用的是比較傳統的 "邊擦邊畫" 法, 但現在更提倡使用 "雙倍緩衝" 法.本例(實際的動畫效果比這個 gif 要好一些):代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils,

學習官方樣本 – TApplication.OnDeactivate

本例功能: 切換視窗時讓程式最小化.代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private procedure AppDeactivate(Sender:

擷取滑鼠當前位置座標的方法 – 回複 “ps8.0″ 同學

問題來源: http://www.cnblogs.com/del/archive/2008/06/14/1218771.html#1225859代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;type TForm1 = class(TForm) procedure FormMouseDown(Sender:

學習官方樣本 – TApplication.OnException

本例示範了全域的異常捕獲及處理, 並類比激發了一個異常; 編譯後, 單獨運行一下產生的程式檔案...本例:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; procedure

使視窗(和 MDI 子視窗)的關閉按鈕變灰的方法 – 回複 “夢想成真”

問題來源: http://www.cnblogs.com/del/archive/2008/06/14/1221980.html#1225922//這樣就可以使當前視窗的關閉按鈕變灰, 但系統功能表中會有一條多餘的線var h: HMENU;begin h := GetSystemMenu(Handle, False); DeleteMenu(h, SC_CLOSE, MF_BYCOMMAND);end;//這樣也可以是當前視窗的關閉按鈕變灰, 同時也去掉了分割線var h:

學習官方樣本 – TApplication.OnMessage

本例示範了一個訊息的定義、發送和接受的過程.本例:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; procedure FormCreate(Sender: TObject);

給 “blog V5″ 的關於 TrackBar 控制項的簡單例子

問題來源: http://www.cnblogs.com/del/archive/2008/06/14/1220638.html#1225896例一:例一代碼:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls;type TForm1 = class(TForm) TrackBar1:

學習官方樣本 – TApplication.OnShowHint

代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; procedure FormCreate(Sender: TObject)

總頁數: 61357 1 .... 4783 4784 4785 4786 4787 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.