How to Use ShellAbout() to Display Standard Windows About Box
ID: Q122893
|
The information in this article applies to:
-
Microsoft Visual Basic Standard and Professional Editions for Windows, versions 2.0, 3.0
SUMMARY
This article shows you how to implement the Windows API ShellAbout()
function to display the standard Windows About box that you see in the
Program Manager, NotePad, and the other Microsoft Windows accessories.
MORE INFORMATION
ShellAbout() resides in SHELL.DLL. Use the following Declare statement in
Visual Basic to declare it; enter the entire Declare statement as one,
single line:
Declare Sub ShellAbout Lib "shell.dll" (ByVal hWndOwner As Integer,
ByVal lpszAppName As String, By lpszMoreInfo As String,
ByVal hIcon As Integer)
where:
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.
Step-by-Step Example
The following steps show you how to call the ShellAbout() API.
- Start a new project in Visual Basic (Alt, F, N). Form1 is created by
default.
- Place a command button (Command1) on Form1.
- Add the following declaration to the general declarations section of
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)
- Add the following code to the Command1_Click event procedure:
Sub Command1_Click()
Call ShellAbout(Me.hWnd, app.Title, "My More Info Section", Me.Icon)
End Sub
- Test the program by pressing the F5 key to run it. Click the command
button to display the About box.
Additional query words:
2.00 3.00
Keywords :
Version : WINDOWS:2.0,3.0
Platform : WINDOWS
Issue type :