PictureBox.PaintPicture problem 
Author Message
 PictureBox.PaintPicture problem

I'm having a problem using the PictureBox's PaintPicture method to paint
an icon on the x axis of a hand-crafted graph in XOR mode. Here's a test
routine. Can anyone tell me why this produces "Invalid procedure call" ?

Private Sub pDest_MouseDown(Button%, Shift%, x1!, y1!)
' paints the icon in PictureBox pSors
' at point x1, y1 in PictureBox pDest
' both pics use scalemode = 1 (twips)
Dim w1!, h1!, x2!, y2!, w2!, h2!
Const OpCode& = &H660046 ' =  SRCINVERT: dest = source XOR dest
w1 = pSors.Width         ' destination width  of picture
h1 = pSors.Height        ' destination height of picture
x2 = 0                   ' x co-ordinate of clipping region in picture
y2 = 0                   ' y co-ordinate of clipping region in picture
w2 = pSors.Width         ' width ...     of clipping region in picture
h2 = pSors.Height        ' height...     of clipping region in picture
pDest.PaintPicture pSors.Picture, x1, y1, w1, h1, x2, y2, w2, h2, OpCode
End Sub

whereas this line in the sub produces no error (but defaults to copy pen):

pDest.PaintPicture pSors.Picture, x1, y1

Patrick in England



Sun, 30 Apr 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Printer.Paintpicture and Picturebox.paintpicture

2. Zoom PictureBox with PaintPicture Problem

3. paintpicture/picturebox gridlines

4. need help with paintpicture and picturebox

5. PictureBox ..PaintPicture->Out of memeory

6. What is the PictureBox's paintpicture method?Can you write a sample for me?Thanks

7. Flip a Picture in PictureBox control using PaintPicture Method

8. PaintPicture problem

9. Problem with PaintPicture...arrgghhhh.....

10. Printer.Paintpicture problem

11. Paintpicture problem

12. PaintPicture / Paste to Clipboard Problem

 

 
Powered by phpBB® Forum Software