Call the API function design ABOUT window

zhaozj2021-02-17  52

API function calls designed ABOUT window Author: Cai be many software training Windows98 system contains a windows-style about the window, it reflects some basic information about the current system to the user, showing the version of windows and application software, copyright and systems Information and other information. The author uses VB 6.0 through the call of the API function to set the application system's About window. The effect is shown in Figure 1.

(Omitted) 1. Building a window with the following control: The control Name Caption window Form1 uses VB6.0 Designs the About Window Performance The button Command1 is closed at the sales management system 2. Listing: ---- Private Declare Function GetWindowWord Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long) As Integer ---- 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 Declare Function ExtractIcon Lib "shell32.dll" Alias ​​"ExtractIconA" (ByVal hinst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As Long Private Declare Function GetDiskFreeSpace Lib "kernel32" Alias ​​"GetDiskFreeSpaceA" (ByVal lpRootPathName As String, lpSectorsPerCluster As Long, lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, lpTotalNumberOfClusters As Long) As Long Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long ---- Private Declare Sub GetSystemInfo Lib "kernel32" (lpSystemInfo As SYSTEM_INFO) Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As LongPrivate Con st GWL_EXSTYLE = (-20) Private Const GWL_STYLE = (-16) Private Const GWL_WNDPROC = (-4) Private Const GWL_HINSTANCE = (-6) Private Type SYSTEM_INFOdwOemID As LongdwPageSize As LonglpMinimumApplicationAddress As LonglpMaximumApplicationAddress As LongdwActiveProcessorMask As LongdwNumberOrfProcessors As LongdwProcessorType As LongdwAllocationGranularity As LongdwReserved As longend typeprivate const SM_CXSCREEN = 0Private const SM_CYSCREEN =

转载请注明原文地址:https://www.9cbs.com/read-29655.html

New Post(0)