Instant About Boxes

Instant About Boxes

The ShellAbout API call provides a quick and easy way to show an aboutbox (using the standard Win95 format) without having to include an additionalform in your project. The call uses four parameters: the hWnd of your maindialog, a string containing the name of your application, another stringcontaining an optional additional line of text, and a long pointer to thehandle of an icon. Start by placing this code in a BAS module:

 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 LongDeclare Function ExtractIcon Lib "shell32.dll" _ 	Alias "ExtractIconA" (ByVal hInst As Long, _	ByVal lpszExeFileName As String, ByVal _	nIconIndex As Long) As LongDeclare Function GetWindowLong Lib "user32" _	Alias "GetWindowLongA" (ByVal hwnd As Long, _	ByVal nIndex As Long) As Long

Add this routine to a button or menu to call your about box:

 	Dim lRet As Long	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, _		"My App Name", "Copyright © 1995 _		My Company Name" & Chr(13) & _		Chr$(10) & "Serial # xxxxxxxxx-xxx", lIcon)

lRet will return true if the dialog was able to display and false ifthere was a problem. All of the required functions operate in both Windows95 and Windows NT.

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several