Caption = "Choose an icon and watch how the selected icon gets the Windows95 ""Selected Icon"" look."
Height = 615
Left = 120
TabIndex = 3
Top = 720
Width = 2415
WordWrap = -1 'True
End
Attribute VB_Name = "frmIcon"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
' Copyright
1997 by Desaware Inc. All Rights Reserved
'**********************************
'** Type Definitions:
#If Win32 Then
Private Type RECT
left As Long
top As Long
right As Long
bottom As Long
End Type
#End If 'WIN32 Types
'**********************************
'** Constant Definitions:
#If Win32 Then
Private Const OPAQUE& = 2
Private Const SRCAND& = &H8800C6
Private Const SRCCOPY& = &HCC0020
Private Const SRCERASE& = &H440328
Private Const SRCINVERT& = &H660046
Private Const DSTINVERT& = &H550009
Private Const SRCPAINT& = &HEE0086
Private Const COLOR_HIGHLIGHT& = 13
Private Const WHITENESS& = &HFF0062
Private Const BLACKNESS& = &H42
#End If 'WIN32
'**********************************
'** Function Declarations:
#If Win32 Then
Private Declare Function DrawIcon& Lib "user32" (ByVal hDC As Long, ByVal x As Long, ByVal y As Long, ByVal hIcon As Long)
Private Declare Function CreateBitmap& Lib "gdi32" (ByVal nWidth As Long, ByVal nHeight As Long, ByVal nPlanes As Long, ByVal nBitCount As Long, lpBits As Any)
Private Declare Function CreateCompatibleBitmap& Lib "gdi32" (ByVal hDC As Long, ByVal nWidth As Long, ByVal nHeight As Long)
Private Declare Function CreateCompatibleDC& Lib "gdi32" (ByVal hDC As Long)
Private Declare Function CreatePatternBrush& Lib "gdi32" (ByVal hBitmap As Long)
Private Declare Function SelectObject& Lib "gdi32" (ByVal hDC As Long, ByVal hObject As Long)
Private Declare Function DeleteDC& Lib "gdi32" (ByVal hDC As Long)
Private Declare Function DeleteObject& Lib "gdi32" (ByVal hObject As Long)
Private Declare Function FillRect& Lib "user32" (ByVal hDC As Long, lpRect As RECT, ByVal hBrush As Long)
Private Declare Function BitBlt& Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal XSrc As Long, ByVal YSrc As Long, ByVal dwRop As Long)
Private Declare Function PatBlt& Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal Pattern As Long)
Private Declare Function GetSysColor& Lib "user32" (ByVal nIndex As Long)
Private Declare Function SetBkColor& Lib "gdi32" (ByVal hDC As Long, ByVal crColor As Long)
Private Declare Function SetTextColor& Lib "gdi32" (ByVal hDC As Long, ByVal crColor As Long)
Private Declare Function SetBkMode& Lib "gdi32" (ByVal hDC As Long, ByVal nBkMode As Long)
Private Declare Function GetDesktopWindow& Lib "user32" ()
Private Declare Function GetDC& Lib "user32" (ByVal hwnd As Long)
Private Declare Function UpdateWindow& Lib "user32" (ByVal hwnd As Long)
Private Declare Function CreateDC& Lib "gdi32" Alias "CreateDCA" (ByVal lpDriverName As String, ByVal lpDeviceName As Long, ByVal lpOutput As Long, lpInitData As Long)
#End If 'WIN32
Private Sub ShadeRect(ByVal hDC As Long, lpRect As RECT)