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. Picture box draw commands? and text in a picture box? how

Picture box draw commands? and text in a picture box? how

Scheduled Pinned Locked Moved Visual Basic
graphicstutorialquestion
4 Posts 2 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.
  • S Offline
    S Offline
    ScarberryProd
    wrote on last edited by
    #1

    could someone show me all the commands used for drawing in a picture box? (an example each would be helpful)? is it possible to draw text in a picture box? preferabley without having to draw each pixel of each letter, u know like is there a command i could use? and could i make it centered? thank you --------------------- And Like The Wind Our Hero Vanishes Off Into The Distance...

    D 1 Reply Last reply
    0
    • S ScarberryProd

      could someone show me all the commands used for drawing in a picture box? (an example each would be helpful)? is it possible to draw text in a picture box? preferabley without having to draw each pixel of each letter, u know like is there a command i could use? and could i make it centered? thank you --------------------- And Like The Wind Our Hero Vanishes Off Into The Distance...

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

      You didn't mention which version of VB, so I'll assume VB.NET. First, you create a Graphics object from the PictureBox's CreateGreaphics method. Then you can use the Graphics object to draw on the PictureBox. The PictureBox itself doesn't have any drawing methods. See the documentation on the Graphics class for explanations and examples. There is just way too much information to post here. System.Drawing.Graphics class docs[^] RageInTheMachine9532

      S 1 Reply Last reply
      0
      • D Dave Kreskowiak

        You didn't mention which version of VB, so I'll assume VB.NET. First, you create a Graphics object from the PictureBox's CreateGreaphics method. Then you can use the Graphics object to draw on the PictureBox. The PictureBox itself doesn't have any drawing methods. See the documentation on the Graphics class for explanations and examples. There is just way too much information to post here. System.Drawing.Graphics class docs[^] RageInTheMachine9532

        S Offline
        S Offline
        ScarberryProd
        wrote on last edited by
        #3

        actually i need it for vb 6 thank you --------------------- And Like The Wind Our Hero Vanishes Off Into The Distance...

        D 1 Reply Last reply
        0
        • S ScarberryProd

          actually i need it for vb 6 thank you --------------------- And Like The Wind Our Hero Vanishes Off Into The Distance...

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

          OK. The VB6 PictureBox docs start here[^]. You can use the Print method to display text in the picturebox anywhere you want. Just remember to set the PictureBox AutoRedraw property to True first. RageInTheMachine9532

          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