|
資源檔有什麼用處呢?最重要的有兩個地方 |
|
- mem-option 可以是以下三種 |
|
- stringID 自行定義的integer,用來定義字串 resource. |
|
- load-option |
|
- mem-option |
|
default for binary resources is MOVEABLE. #define IDS_HELLO 1 #define IDS_GOODBYE 2 STRINGTABLE BEGIN IDS_HELLO, "Hello" IDS_GOODBYE, "Goodbye" 3, "This is a Test" END STRINGTABLE BEGIN 101, "您好" 102, "再見了" 103, "這是一個測試" END ///////////////////////////////////////////////// // Bitmap //////////////////////////////////////////////// 1 BITMAP "CLI.BMP" 101 BITMAP "CLI2.BMP" BITMAP3 BITMAP "多多.BMP" //////////////////////////////////////////////// // ICON /////////////////////////////////////////////// 1 ICON CLIENT.ICO 以下是在form中,需3個Command Button 3個Label 1個PictureBox 另需在 專案功能表 中選 新增檔案 並進而選取Test32.Res Option Explicit Private Sub Command1_Click() Call ShowRtn(0) End Sub Private Sub ShowRtn(ByVal i As Long) Label1.Caption = LoadResString(i + 1) Label2.Caption = LoadResString(i + 2) Label3.Caption = LoadResString(i + 3) Set Picture1 = LoadResPicture(i + 1, vbResBitmap) End Sub Private Sub Command2_Click() Call ShowRtn(100) End Sub Private Sub Command3_Click() Set Picture1 = LoadResPicture("BITMAP3", vbResBitmap) End Sub |
|
||
cww |
|
|
如果對本站有任何建議,歡迎來信給Honey,我們會盡快給您答覆 |