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. Graphics Question

Graphics Question

Scheduled Pinned Locked Moved Visual Basic
questioncsharpgraphics
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.
  • Q Offline
    Q Offline
    Quecumber256
    wrote on last edited by
    #1

    Hi Everyone: I'm trying to teach myself VB 2005 .NET and the best way I have found to learn something is to make a project in the language I wish to learn. I'm playing with a graphics Windows application. I want to draw a simple graphics shape(rectangle, circle, line, etc) on a windows form and be able to move that graphics object anywhere on the form using the mouse. Does anyone have any sample code that can draw a shape on the windows form and allow to move it with the mouse, or arrow keys? Thanks in advance, Quecumber256

    P D 2 Replies Last reply
    0
    • Q Quecumber256

      Hi Everyone: I'm trying to teach myself VB 2005 .NET and the best way I have found to learn something is to make a project in the language I wish to learn. I'm playing with a graphics Windows application. I want to draw a simple graphics shape(rectangle, circle, line, etc) on a windows form and be able to move that graphics object anywhere on the form using the mouse. Does anyone have any sample code that can draw a shape on the windows form and allow to move it with the mouse, or arrow keys? Thanks in advance, Quecumber256

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      If you want to learn, you would be better off writing the code yourself. How are you going to learn anything if someone else writes the code for you?

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      1 Reply Last reply
      0
      • Q Quecumber256

        Hi Everyone: I'm trying to teach myself VB 2005 .NET and the best way I have found to learn something is to make a project in the language I wish to learn. I'm playing with a graphics Windows application. I want to draw a simple graphics shape(rectangle, circle, line, etc) on a windows form and be able to move that graphics object anywhere on the form using the mouse. Does anyone have any sample code that can draw a shape on the windows form and allow to move it with the mouse, or arrow keys? Thanks in advance, Quecumber256

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

        There are no built-in classes to do this, not is there any support built into GDI for this either. What you're referring to is a "retained mode" graphics system. This is something that you either have to write yourself (WARNING! NOT for someone who has little experience!), or use a third party library to handle it for you, like VG.NET.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        Q 1 Reply Last reply
        0
        • D Dave Kreskowiak

          There are no built-in classes to do this, not is there any support built into GDI for this either. What you're referring to is a "retained mode" graphics system. This is something that you either have to write yourself (WARNING! NOT for someone who has little experience!), or use a third party library to handle it for you, like VG.NET.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          Q Offline
          Q Offline
          Quecumber256
          wrote on last edited by
          #4

          Dave: Thank you. I have had some discussions with our .NET developer here at the office and he put some things in perspective for me. For example: I drew a square on the windows form. That would be level 1. Next I drew a circle on top of the square, this is level 2. So if I click on the circle I have to have some routine that looks at the levels and sees where the cursor is pointing, which level it is on, and then place some kind of "visual handlers" around the object then use another routine to move it on the form. This helps me grasp the concept of what I'm trying to accomplish. Do you have any recommendations for books that cover graphics manipulation and programming for VB .NET? Thank you, Quecumber256

          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