Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

About Box 1

Status
Not open for further replies.

marcodl

IS-IT--Management
Feb 16, 2005
7
ES
Have been searching on the net for a solution how to personalize the "About Box" with my own application-info. Found however nothing interesting.
Prefer to call this box from the Help menu as is done in standard Access.

Who can Help? thx

Marco


 
Most apps where I've added one, it was just a form accessed from a custom menu.

traingamer
 
Thx for the proposed solutions. Creating a custom form indeed is the easiest way however I would like to integrate an API as suggested in FancyPrairie's answer.

So I imm tried the API but encounter an error 424...

Here's what I have done:

1. created a module "About Box" with the delarations:

Option Compare Database
Option Explicit

Global Const GWW_HINSTANCE = (-6)

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

Declare Function ExtractIcon Lib "shell32.dll" _
Alias "ExtractIconA" (ByVal hInst As Long, _
ByVal lpszExeFileName As String, ByVal _
nIconIndex As Long) As Long

Declare Function GetWindowLong Lib "user32" _
Alias "GetWindowLongA" (ByVal hwnd As Long, _
ByVal nIndex As Long) As Long

Then I created a form with 1 button and added the next code to the OnClick property:

Private Sub Knop0_Click()

Dim lNull As Long
Dim lIcon As Long
Dim lInst As Long

lInst = GetWindowLong(Form1.hwnd, GWW_HINSTANCE)
lIcon = ExtractIcon(lInst, "MYEXE.EXE", 0&)
lRet = ShellAbout(Form1.hwnd, "Agenda KO", "Copyright © 2004 ACTIDEL" & Chr(13) & _
Chr$(10) & "Serial # 12345-00", lIcon)

End Sub

When clicking the button I get the error 424 ...

Any suggestion to correct?

thx

Marco

 
You have 3 mistakes in your code.

1 & 2. Form1.hwnd should be Me.hwnd (you need to change it in 2 places)
3. "Agenda KO" should be CurrentProject.Name

Fix those 3 lines and it should work.

Private Sub Knop0_Click()

Dim lNull As Long
Dim lIcon As Long
Dim lInst As Long

lInst = GetWindowLong(Me.hwnd, GWW_HINSTANCE)
lIcon = ExtractIcon(lInst, "MYEXE.EXE", 0&)
lRet = ShellAbout(Me.hwnd, CurrentProject.Name, "Copyright © 2004 ACTIDEL" & Chr(13) & _
Chr$(10) & "Serial # 12345-00", lIcon)

End Sub
 
Thx FancyPrairie: this solved indeed the problem. I now have a professional "About Box" installed in my Help-menu.

Marco
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top