Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. picturebox location runtime

picturebox location runtime

Scheduled Pinned Locked Moved Visual Basic
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    WestSideRailways
    wrote on last edited by
    #1

    hi there, I am new to VB2005 Express, and would like to know if it is possible to change the location of a picturebox via code at runtime. In my program i have the screen cut into quarters and would like to display an image from one of the quarters to full size. The top left works like a charm. The others only fill half the screen from where they are. Thank you.

    D T 2 Replies Last reply
    0
    • W WestSideRailways

      hi there, I am new to VB2005 Express, and would like to know if it is possible to change the location of a picturebox via code at runtime. In my program i have the screen cut into quarters and would like to display an image from one of the quarters to full size. The top left works like a charm. The others only fill half the screen from where they are. Thank you.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You can change the Location, or Top and Left, properties to move the entire window. You then change the Size, or Width and Height, properties to change the controls size to whatever you want. All the properties of a PictureBox control are changable at run-time.

      Dave Kreskowiak Microsoft MVP - Visual Basic

      1 Reply Last reply
      0
      • W WestSideRailways

        hi there, I am new to VB2005 Express, and would like to know if it is possible to change the location of a picturebox via code at runtime. In my program i have the screen cut into quarters and would like to display an image from one of the quarters to full size. The top left works like a charm. The others only fill half the screen from where they are. Thank you.

        T Offline
        T Offline
        The ANZAC
        wrote on last edited by
        #3

        when changing location, be sure to specify it as New. For example: PictureBox1.Location = New Point(x,y)

        Posted by The ANZAC

        W 1 Reply Last reply
        0
        • T The ANZAC

          when changing location, be sure to specify it as New. For example: PictureBox1.Location = New Point(x,y)

          Posted by The ANZAC

          W Offline
          W Offline
          WestSideRailways
          wrote on last edited by
          #4

          Thanks for all your replys.:):cool:

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups