ShellAbout

顯示標準 Windows 關於框,您看到程式管理器、 記事本,和其他 Windows 附屬檔案中。

基本介紹

  • 外文名:ShellAbout
  • 用途:顯示標準 Windows 關於框
  • 來源:記事本、其他 Windows 附屬檔案中
  • 性質: 函式
ShellAbout 函式,位置,

ShellAbout 函式

參數:  al_hWnd:視窗的句柄(hwnd)  as_szApp:名稱,該名稱會顯示在標題和第一行(如右圖所示)  as_szOtherStuff:版權資訊,會在著作權所有...的下面一行出現。  hIcon:圖示句柄,圖示會在左上角(如右圖記事本圖示)處顯示。可以由LoadImageExtractIconLoadicon等函式返回。該值可以為0表示沒有圖示。  返回值:返回0表示運行失敗,返回非0表示成功。
ShellAbout() 駐留在 SHELL.DLL。在 Visual Basic 中使用以下 Declare 語句,可以將其聲明 ; 作為一個,單行輸入整個 Declare 語句:
Declare Sub ShellAbout Lib "shell.dll" (ByVal hWndOwner As Integer,
ByVal lpszAppName As String, By lpszMoreInfo As String,
ByVal hIcon As Integer)

位置

hWndOwner - the Window handle of the parent form(調用該函式的視窗句丙).
lpszAppName - the information you want to appear in the caption of the About box, usually the application's title(通常是你的應用程式標題).
lpszMoreInfo - any additional message you want to display(要在 關於 視窗中顯示的其他信息,如版權資訊等).
hIcon - the handle to the icon you want displayed in the upper left corner(標準關於視窗中顯示的圖示,通常是你的應該用程式圖示).
下列步驟顯示如何調用 ShellAbout() API。
在 Visual Basic (Alt,F,N) 中啟動新項目。默認情況下創建 Form1。在 Form1 上放置一個命令按鈕 (Command1)。將下面的聲明添加到 Form1 的常規聲明部分:
' Enter the following three lines as one, single line: Declare Sub ShellAbout Lib "shell.dll" (ByVal hWndOwner As Integer, ByVal lpszAppName As String, ByVal lpszMoreInfo As String, ByVal hIcon As Integer)
下面的代碼添加到事件過程中 Command1_Click:
Sub Command1_Click()
Call ShellAbout(Me.hWnd, app.Title, "My More Info Section", Me.Icon)
End Sub
通過按 F5 鍵運行該測試該程式。單擊命令按鈕以顯示關於框。
C++代碼: #include <windows.h> 然後在main裡面使用 ShellAboutA(handle(parent),"軟體名稱","版權資訊,0) 易語言代碼: .版本 2 .DLL命令 ShellAboutA, 整數型, , , , 該函式用於彈出一個系統關於視窗 .參數 HWND, 整數型, , 視窗的句柄(hwnd) .參數 as_szApp, 文本型, , 名稱 .參數 as_szOtherStuff, 文本型, , 版權資訊 .參數 hIcon, 整數型, , 圖示句柄,圖示會在左上角處顯示。可以由LoadImage、ExtractIcon、Loadicon等函式返回。該值可以為0表示沒有圖示。

相關詞條

熱門詞條

聯絡我們