Picture as Background

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mclueless
    New Member
    • Jan 2008
    • 56

    Picture as Background

    How to put a Picture as background for a form in vb6???
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    Try this in FormLoad:

    Me.Picture = LoadPicture("C: \Pict1.bmp")

    Regards
    Veena

    Comment

    • mclueless
      New Member
      • Jan 2008
      • 56

      #3
      Originally posted by QVeen72
      Hi,

      Try this in FormLoad:

      Me.Picture = LoadPicture("C: \Pict1.bmp")

      Regards
      Veena


      this is not working...

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        Hi,

        Did you change the Picture Name..?
        Where have you written the code..?

        Regards
        Veena

        Comment

        • lotus18
          Contributor
          • Nov 2007
          • 865

          #5
          There are some image formats that cannot be read by VB6.0 (e.g. .png). Try also the color mode of the image if it is in rgb or cmyk mode. : )

          Rey Sean

          Comment

          • werks
            New Member
            • Dec 2007
            • 218

            #6
            Originally posted by mclueless
            How to put a Picture as background for a form in vb6???
            in the properties of the Form you can insert a picture there..


            Better Than Yesterday

            Comment

            • mclueless
              New Member
              • Jan 2008
              • 56

              #7
              Originally posted by QVeen72
              Hi,

              Did you change the Picture Name..?
              Where have you written the code..?

              Regards
              Veena

              ofcourse i changed the picture name.
              i have written the code in form load event

              private sub form_load()

              me.picture=load picture("C:\Doc uments and Settings\Admini strator\Desktop \From Zero\image.jpeg ")

              end sub

              Comment

              • lotus18
                Contributor
                • Nov 2007
                • 865

                #8
                Originally posted by mclueless
                ofcourse i changed the picture name.
                i have written the code in form load event

                private sub form_load()

                me.picture=load picture("C:\Doc uments and Settings\Admini strator\Desktop \From Zero\image.jpeg ")

                end sub
                Hi

                Did you try it on form properties as suggested by werks?

                Rey Sean

                Comment

                • codechalie
                  New Member
                  • Jan 2008
                  • 3

                  #9
                  well there are two main alternatives you will use first

                  you can just go to your toolbox get the image control or picture box control
                  put it to the form and go to the propertise of that image control and click where there is pictureand locate the picture.

                  secondly you can load it on run time.
                  me.picture = loadpicture("lo cation of the picture")
                  try it out.

                  Comment

                  • QVeen72
                    Recognized Expert Top Contributor
                    • Oct 2006
                    • 1445

                    #10
                    Hi,

                    I guess, LoadPicture dosent support ".jpeg" extensions, change it to ".jpg" and check

                    me.picture=load picture("C:\Doc uments and Settings\Admini strator\Desktop \From Zero\image.jpg" )


                    Regards
                    Veena

                    Comment

                    • Killer42
                      Recognized Expert Expert
                      • Oct 2006
                      • 8429

                      #11
                      I think before we make any more guesses, it would be very helpful if mclueless tells us what "not working" actually means. We're working in the dark here - it could be anything from "that's not the right image" to "the computer blew up and destroyed the house". Chances are it's somewhere between these extremes, of course.

                      Comment

                      • Ali Rizwan
                        Banned
                        Contributor
                        • Aug 2007
                        • 931

                        #12
                        Originally posted by mclueless
                        How to put a Picture as background for a form in vb6???
                        Here comes an other problem to you that if the picture resolution is larger than form it will not appears full or if it is smaller then other portion of form will remain uncolored.
                        Like if your form is on 1024x768 resolution and picture you are using as background is of 640xsomething then it will not cover the whole form.
                        You can check this by applying...
                        Regards
                        >> ALI<<

                        Comment

                        Working...