Help! Getting Metafile Handle From Picture Box 
Author Message
 Help! Getting Metafile Handle From Picture Box

How do you get the metafile handle of a metafile after it has been
loaded into a picture box control?


Wed, 23 May 2001 03:00:00 GMT  
 Help! Getting Metafile Handle From Picture Box
.Picture is an handle (number)
Quote:

>How do you get the metafile handle of a metafile after it has been
>loaded into a picture box control?



Thu, 24 May 2001 03:00:00 GMT  
 Help! Getting Metafile Handle From Picture Box
Piece of my old 16bits code; Yes, aliases and other unreadable shit ,
however it does work!

PicHandle = Pic1.Picture

        'Store old hDC
        OldhDC = SaveDC_PP(ToObjhDC)
        'Debug.Print OldhDC
        '
        'Set mapping mode of Control to MM_ANISOTROPIC.
        OldMapMode = SetMapMode_PP(ToObjhDC, 8)

        'Set start co -ordinates
        Result = SetViewPortOrg_PP(ToObjhDC, CInt(X), CInt(Y))
        'Debug.Print Result
        '
        'Set Width & Height of output (Added to startingpositions!)
        Result = SetViewPortExt_PP(ToObjhDC, PicWidth, PicHeight)
        'Debug.Print Result
        '
        Result = PlayMetafile_PP(ToObjhDC, PicHandle)
        'Debug.Print Result
        '
        'Restore OldMapMode
        OldMapMode = SetMapMode_PP(ToObjhDC, OldMapMode)
        '
        'Restore old hDC
        OldhDC = RestoreDC_PP(ToObjhDC, OldhDC)

Quote:

>How do you get the metafile handle of a metafile after it has been
>loaded into a picture box control?



Thu, 24 May 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help! Getting Metafile Handle From Picture Box

2. Getting Metafile Handle from VB Picture Box

3. Saving Picture Box contents to a metafiles

4. Query: copying picture boxes to metafiles (not bitmaps)

5. Invisible form, picture box and Metafile

6. Metafile and Picture Boxes

7. saving a metafile *.wmf from a picture box

8. Handling .tif files in Picture Box Control?

9. Dll returns a Handle to a DIB how can I display in picture box

10. Getting handle for edit portion of combo box

11. Picture Box gets kinda Distorted

12. Getting an invisible form to paint itself to a picture box

 

 
Powered by phpBB® Forum Software