Bmp_LwOStdPicture
Implementing IPicture for showing transparent bitmaps correctly
Project started in feb. 2023.
This example shows how to implement the IPicture-Interface for supporting alpha-channel-bitmaps through AlphaBlend-Api, by using a lightweight-object.
this is a non working sample, it is pre beta How to use it:
Option Explicit
Private m_PFN As String
Private m_Pic As TIPicture
Private Sub Form_Load()
InitIPictureVTable
m_PFN = App.Path & "\Bird.bmp"
End Sub
Private Sub BtnLoadIPicture_Click()
Set Picture1.Picture = New_IPicture(m_Pic, LoadPicture(m_PFN))
End Sub
Private Sub BtnLoadIPictureDisp_Click()
Set Picture1.Picture = New_IPictureDisp(m_Pic, LoadPicture(m_PFN))
End Sub
Private Sub BtnChangeBackColor_Click()
Picture1.BackColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)
End Sub