hPal property in Picture control (16 bit VB4) 
Author Message
 hPal property in Picture control (16 bit VB4)


I'm moving my VB-4 32-bit program back to VB-4 16-bit.  I'm using 256
bitmaps loaded in PictureBox controls and am creating and assigning a
LogPalette to the picture.  Here's my code to assign the palette to the
Picture in the PictureBox control:

Sub AssignPalette(aForm As Form, aPicture As Picture)

    Dim hClip           ' As ApiInt
    Dim siReturn        ' As ApiInt
    Dim hPal As Long    ' as ApiInt

    hClip = OpenClipboard(aForm.hWnd)
    If hClip = 0 Then
        MsgBox "Can't open clipboard"
    End If

    ' m_hPalette in the following line  is a handle to my created palette
    siReturn = SetClipboardData(vbCFPalette, m_hPalette)

    hPal = GetClipboardData(vbCFPalette)
    siReturn = CloseClipboard()
    aPicture.hPal = hPal                                 ' doesn't work in
16 bit VB4!!

End Sub

This works fine in 32-bit VB4 but it appears that you can't set the
hPal property in 16-bit VB4.  I can Get the existing hPal for the Picture.

Any suggestions?

Tue, 22 Jun 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. hPal Picture property in VB4/32 vs VB4/16

2. Calling 16 bit DLL from VB4 16 bit in Win 95

3. Russian(Cyrillic): vb4 32-bit works, but vb4 16-bit doesn't

4. GIF enabled picture/image box for VB4 16 bit

5. Forecasting using Grid Control and Graph Control - VB4.0 16 bit

6. Passthrough queries fail in 16-bit VB4, succeed in 32-bit

7. HELP: VB4-16 bit to VB5-32 bit problem

8. VB4.0 - 16 bit and 32 bit

9. VB4 16-bit vs 32-bit

10. VB4 16-bit vs 32-bit

11. Can VB4.0 32 Bit call a 16 bit DLL


Powered by phpBB® Forum Software