### GDI Constants for Pen Styles Source: https://github.com/combit/ll-samples/blob/main/Visual Basic/Advanced Example/gdiapi.txt Defines constants for standard GDI pen styles, such as NULL_PEN and BLACK_PEN. ```vb Global Const NULL_PEN = 8 Global Const BLACK_PEN = 7 ``` -------------------------------- ### Win32 User API Declarations Source: https://github.com/combit/ll-samples/blob/main/Visual Basic/Advanced Example/userapi.txt Declares Windows API functions for 32-bit environments. These declarations are used for interacting with the Windows operating system, including window management functions like SetParent. ```Visual Basic Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long Declare Function GetTickCount Lib "user32" () As Long Declare Function EnableWindow Lib "user32" (ByVal hWnd As Long, ByVal BOOL As Long) As Long Declare Function IsWindowEnabled Lib "user32" (ByVal hWnd As Long) As Long Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long ``` -------------------------------- ### Data Type Constants Source: https://github.com/combit/ll-samples/blob/main/Visual Basic/Advanced Example/datacons.txt Defines constants for common database data types. Use these to specify the type of data being handled. ```Visual Basic Global Const DB_BOOLEAN = 1 Global Const DB_BYTE = 2 Global Const DB_INTEGER = 3 Global Const DB_LONG = 4 Global Const DB_CURRENCY = 5 Global Const DB_SINGLE = 6 Global Const DB_DOUBLE = 7 Global Const DB_DATE = 8 Global Const DB_TEXT = 10 Global Const DB_LONGBINARY = 11 Global Const DB_MEMO = 12 ``` -------------------------------- ### Win16 User API Declarations Source: https://github.com/combit/ll-samples/blob/main/Visual Basic/Advanced Example/userapi.txt Declares Windows API functions for 16-bit environments. These functions interact with the Windows operating system for tasks such as retrieving system colors, system uptime, and window manipulation. ```Visual Basic Declare Function GetSysColor Lib "User" (ByVal nIndex As Integer) As Long Declare Function GetTickCount Lib "User" () As Long Declare Function EnableWindow Lib "User" (ByVal hWnd As Integer, ByVal BOOL As Integer) As Integer Declare Function IsWindowEnabled Lib "User" (ByVal hWnd As Integer) As Integer ``` -------------------------------- ### Declaring Global Constants in Visual Basic Source: https://github.com/combit/ll-samples/blob/main/Visual Basic/Advanced Example/constant.txt Declare global constants using the 'Global Const' keyword. These constants are accessible from any module within the project. Use meaningful names and appropriate data types. ```Visual Basic Attribute VB_Name = "CONSTANT" Global Const MB_OK = 0 ' OK button only Global Const MB_ICONSTOP = 16 ' Critical message Global sDatabaseName As String Global dummy As Long Global nLanguage As Integer Global bUseCallbacks As Integer Global ObjParameters As String ``` -------------------------------- ### Win32/Win64 GDI API Declarations and Structures Source: https://github.com/combit/ll-samples/blob/main/Visual Basic/Advanced Example/gdiapi.txt Visual Basic declarations and type definitions for GDI functions when targeting Win32 or Win64 environments. These use Long types for handles and parameters, and define POINTAPI and SIZE structures. ```vb Type POINTAPI x As Long y As Long End Type Type SIZE cx As Long cy As Long End Type Declare Function GetStockObject Lib "GDI32" (ByVal nIndex As Long) As Long Declare Function SelectObject Lib "GDI32" (ByVal hDC As Long, ByVal hObject As Long) As Long Declare Function MoveToEx Lib "GDI32" (ByVal hDC As Long, ByVal x As Long, ByVal y As Long, lpPoint As POINTAPI) As Long Declare Function LineTo Lib "GDI32" (ByVal hDC As Long, ByVal x As Long, ByVal y As Long) As Long Declare Function MulDiv Lib "kernel32" (ByVal nNumber As Long, ByVal nNumerator As Long, ByVal nDenominator As Long) As Long Declare Function CreateSolidBrush Lib "GDI32" (ByVal crColor As Long) As Long Declare Function DeleteObject Lib "GDI32" (ByVal hObject As Long) As Long Declare Function GetTextExtentPoint Lib "GDI32" Alias "GetTextExtentPointA" (ByVal hDC As Long, ByVal lpszString As String, ByVal cbString As Long, lpSize As SIZE) As Long Declare Function SetTextAlign Lib "GDI32" (ByVal hDC As Long, ByVal wFlags As Long) As Long Declare Function TextOut Lib "GDI32" Alias "TextOutA" (ByVal hDC As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long Declare Function OffsetWindowOrgEx Lib "GDI32" (ByVal hDC As Long, ByVal x As Long, ByVal y As Long, lpoint As POINTAPI) As Long Declare Function Rectangle Lib "GDI32" (ByVal hDC As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long ``` -------------------------------- ### Access Mode Constants Source: https://github.com/combit/ll-samples/blob/main/Visual Basic/Advanced Example/datacons.txt Defines constants for database access modes. These control how data can be read and modified. ```Visual Basic Global Const DB_READONLY = &H4 Global Const DB_INCONSISTENT = &H10 Global Const DB_CONSISTENT = &H20 ``` -------------------------------- ### Win16 GDI API Declarations Source: https://github.com/combit/ll-samples/blob/main/Visual Basic/Advanced Example/gdiapi.txt Visual Basic declarations for GDI functions when targeting Win16 environments. These use Integer types for handles and parameters. ```vb Declare Function GetStockObject Lib "GDI" (ByVal nIndex As Integer) As Integer Declare Function SelectObject Lib "GDI" (ByVal hDC As Integer, ByVal hObject As Integer) As Integer Declare Function MoveTo Lib "GDI" (ByVal hDC As Integer, ByVal x As Integer, ByVal y As Integer) As Long Declare Function LineTo Lib "GDI" (ByVal hDC As Integer, ByVal x As Integer, ByVal y As Integer) As Integer Declare Function MulDiv Lib "GDI" (ByVal nNumber As Integer, ByVal nNumerator As Integer, ByVal nDenominator As Integer) As Integer Declare Function CreateSolidBrush Lib "GDI" (ByVal crColor As Long) As Integer Declare Function DeleteObject Lib "GDI" (ByVal hObject As Integer) As Integer Declare Function GetTextExtent Lib "GDI" (ByVal hDC As Integer, ByVal lpString As String, ByVal nCount As Integer) As Long Declare Function SetTextAlign Lib "GDI" (ByVal hDC As Integer, ByVal wFlags As Integer) As Integer Declare Function TextOut Lib "GDI" (ByVal hDC As Integer, ByVal x As Integer, ByVal y As Integer, ByVal lpString As String, ByVal nCount As Integer) As Integer Declare Function OffsetWindowOrg Lib "GDI" (ByVal hDC As Integer, ByVal x As Integer, ByVal y As Integer) As Long Declare Function Rectangle Lib "GDI" (ByVal hDC As Integer, ByVal X1 As Integer, ByVal Y1 As Integer, ByVal X2 As Integer, ByVal Y2 As Integer) As Integer ``` -------------------------------- ### GDI Constants for Text Alignment Source: https://github.com/combit/ll-samples/blob/main/Visual Basic/Advanced Example/gdiapi.txt Defines constants for controlling text alignment within a device context, including horizontal and vertical positioning. ```vb Global Const TA_LEFT = 0 Global Const TA_RIGHT = 2 Global Const TA_CENTER = 6 Global Const TA_TOP = 0 Global Const TA_BOTTOM = 8 Global Const TA_BASELINE = 24 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.