When using the SHAPE clause with TsButton I get an annoying border when the dialog that contains the button has some kind of background color.
Antonio suggested to fix the tsbutton class using FWTransBmp() function and showed the code below as called from FW Tbitmap Class:
- Code: Select all Expand view RUN
hBmpOld = SelectObject( ::hDC, ::hBitmap )
nZeroZeroClr = GetPixel( ::hDC, 0, 0 )
SelectObject( ::hDC, hBmpOld )
nOldClr = SetBkColor( ::hDC, nRGB( 255, 255, 255 ) )
TransBmp( ::hBitmap, ::nWidth(), ::nHeight(), nZeroZeroClr, ::hDC,;
::nX, ::nY, Super:nWidth(), Super:nHeight() )
SetBkColor( ::hDC, nOldClr )
Here's an image of the annoying border I'm referring to:
Perhaps someone has already patch Tsbutton to work with transparencies and would like to share the code or show how?
Reinaldo.