Microsoft KB Archive/122893

= How to Use ShellAbout to Display Standard Windows About Box =

Article ID: 122893

Article Last Modified on 12/9/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition

-



This article was previously published under Q122893



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: KB122893

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.