Placing a picture on an MDI form

Placing a picture on an MDI form

Post by Stuart Quinto » Sat, 31 Mar 2001 20:29:06



Hello

I want to be able to place an image (either bitmap jpeg etc) on a MDI form,
the image size can vary and needs to be centred into the available space.
Using the picutre property is no good as it alwasy places the image in the
top left corner and I don't want to place a Picture Box control on the form
and use that.

I have tried using the BitBlt API call but it does not seem to work and
suggestions or example code would be appreciated.

TIA

Stuart

 
 
 

Placing a picture on an MDI form

Post by alpin » Sat, 31 Mar 2001 22:42:12


On Fri, 30 Mar 2001 12:29:06 +0100, "Stuart Quinton"


>Hello

>I want to be able to place an image (either bitmap jpeg etc) on a MDI form,
>the image size can vary and needs to be centred into the available space.
>Using the picutre property is no good as it alwasy places the image in the
>top left corner and I don't want to place a Picture Box control on the form
>and use that.

>I have tried using the BitBlt API call but it does not seem to work and
>suggestions or example code would be appreciated.

>TIA

>Stuart

Have a look at the MDI Background demo at
http://www.mvps.org/vbvision/

HTH,
Bryan
____________________________________________________________
New Vision Software            "When the going gets weird,"
Bryan Stafford                   "the weird turn pro."

Microsoft MVP-Visual Basic     Fear and Loathing in LasVegas

 
 
 

1. !! HELP !! Placing Images On MDI-Form

Hi there groupies,

Is there someone who can explain to me how i paint a picture on the
MDI-Area of an MDI-Form. I've tried it with paintpicture but it didn't
work out. Here's my code :

fMainForm is the MDI-Form i'm talking about.

Sub TilePic()
    Dim I, J, W, H, Ws, Hs As Integer
    W = fMainForm.ScaleWidth
    H = fMainForm.ScaleHeight
    Ws = (W / Image1.Width) + 1 ' Image1 is containing the picture to be
tiled...
    Hs = (H / Image1.Height) + 1
    For I = 1 To Ws
        For J = 1 To Hs
            fMainForm.PaintPicture(Image1.Picture, (I - 1) * Ws, (I - 1)
* Hs)
        Next
    Next
End Sub

Please help me...

Arie

2. HELP!! "Illegal number of intersections"

3. How to place TLabel on MDI form

4. Tolerance issue in BMRT.

5. Picture in MDI Parent Form

6. QuickTime on SGI

7. Sizing picture box in a MDI form Question.

8. info-gnuplot-digest V1 #1901

9. MDI Form, ZOrder of Componets vrs MDIchild forms

10. Place Image in MDI Parent

11. How to place icon on MDI workplace?

12. How to place icons on MDI workplace?

13. Mdi forms and control box