BCGControlBar Library for .NET
CreateDisabledImage Method




The bitmap to create disabled image.
Specifies the percent of the grey color to make a bitmap disabled.
The color structure that represents the color to make transparent on disabling the image.
Specifies if the color from parameter "transparencyKey" will not be set as a transparent for disabled bitmap.
The color to draw a disabled image if "grayPersentage" parameter is equal -1.
The color of the highlighted image. Sets if the color structure from the parameter "clrDisabled" is empty.
Called by the framework to create disabled image on disabled buttons on command bars, disabled markers of the SDManager.
Syntax
'Declaration
 
Public Shared Function CreateDisabledImage( _
   ByVal srcBitmap As Bitmap, _
   ByVal grayPercentage As Integer, _
   ByVal transparencyKey As Color, _
   ByVal ignoreTransparency As Boolean, _
   ByVal clrDisabled As Color, _
   ByVal clrBtnHilite As Color _
) As Bitmap
'Usage
 
Dim srcBitmap As Bitmap
Dim grayPercentage As Integer
Dim transparencyKey As Color
Dim ignoreTransparency As Boolean
Dim clrDisabled As Color
Dim clrBtnHilite As Color
Dim value As Bitmap
 
value = DrawManager.CreateDisabledImage(srcBitmap, grayPercentage, transparencyKey, ignoreTransparency, clrDisabled, clrBtnHilite)
public static Bitmap CreateDisabledImage( 
   Bitmap srcBitmap,
   int grayPercentage,
   Color transparencyKey,
   bool ignoreTransparency,
   Color clrDisabled,
   Color clrBtnHilite
)
public: static Bitmap* CreateDisabledImage( 
   Bitmap* srcBitmap,
   int grayPercentage,
   Color transparencyKey,
   bool ignoreTransparency,
   Color clrDisabled,
   Color clrBtnHilite
) 
public:
static Bitmap^ CreateDisabledImage( 
   Bitmap^ srcBitmap,
   int grayPercentage,
   Color transparencyKey,
   bool ignoreTransparency,
   Color clrDisabled,
   Color clrBtnHilite
) 

Parameters

srcBitmap
The bitmap to create disabled image.
grayPercentage
Specifies the percent of the grey color to make a bitmap disabled.
transparencyKey
The color structure that represents the color to make transparent on disabling the image.
ignoreTransparency
Specifies if the color from parameter "transparencyKey" will not be set as a transparent for disabled bitmap.
clrDisabled
The color to draw a disabled image if "grayPersentage" parameter is equal -1.
clrBtnHilite
The color of the highlighted image. Sets if the color structure from the parameter "clrDisabled" is empty.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DrawManager Class
DrawManager Members

Send Feedback