API's about box dialog


Back
'*********************************************************
' AboutBox
' 
' With this simple code we can show the Windows About
' box. It will show the associated icon of our database,
' if there is one or the windows logo if none.
'
' Juan M. Afán de Ribera
' May-2003
'
'
Private Declare Function LoadImage _
                Lib "user32" _
                Alias "LoadImageA" _
                (ByVal hInst As Long, _
                ByVal lpsz As String, _
                ByVal un1 As Long, _
                ByVal n1 As Long, _
                ByVal n2 As Long, _
                ByVal un2 As Long) As Long
   
Private Declare Function ShellAbout _
                Lib "shell32.dll" _
                Alias "ShellAboutA" _
                (ByVal hwnd As Long, _
                ByVal szApp As String, _
                ByVal szOtherStuff As String, _
                ByVal hIcon As Long) As Long
      
Private Const IMAGE_ICON = 1
Private Const LR_LOADFROMFILE = &H10

Sub AboutBox()
Dim szApp As String
Dim szOtherStuff As String
Dim DbIcon As String
Dim hIcon As Long

   szApp = " -> About ..."
szOtherStuff = "Author: Juan M. Afán de Ribera" On Error Resume Next DbIcon = CurrentDb.Properties("AppIcon") hIcon = LoadImage(0&, DbIcon, IMAGE_ICON, _ 32, 32, LR_LOADFROMFILE) ShellAbout hWndAccessApp, szApp, szOtherStuff, hIcon End Sub '*********************************************************
E-mail Last update 8/09/2003     © Juan M. Afán deRibera