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. Interactive graphic - Visual Basic 2005 [modified]

Interactive graphic - Visual Basic 2005 [modified]

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

    Hi, i am somewhat of a new programmer to visual basic... progamming knowledge at a bit of a sad low level. part of the program i am building requires the following: my so called client leases out spaces on pieces of land for whatever purpose, in a sort of perfect grid. firstly, the layout of how the land will be divided is loaded as a template to the system, details stored on database... total plot dimensions, and vertical and horizontal spaces is stored. the program generates a little grid display of what it might look like, thats simple enough. when the user requires a piece of land to be formatted according to his needs, the template is selected from database, new entry is created in a table dealing with active plots. for each sector of land, a serial number gets generated, each sector state set to "vacant". the problem on my part (due to my pathetic coding skills) comes in with coding the actual bookings part of the system. when the user selects the appropriate plot of land to perform bookings on, an interactive display of the plot needs be generated out of information in the database table. occupied sectors and vacant sectors in different colours, and the user needs to be able to highlight various (multiple) vacant sectors to book for his client. when "book" is clicked, the status field in the land plot table needs to be changed from "vacant" to "occupied". i have a very very vague idea on how this is to be done, but at the moment, am completely stuck. not a clue as to how to generate the plot of land on screen with the different colours from the information in the database table, and beyond that, how to make it "interactive" with mouse events annnnd how to program it to return the values of which sections were selected i'd really appreciate any suggestions. :doh:

    modified on Monday, August 18, 2008 8:22 PM

    C 1 Reply Last reply
    0
    • B brajoez

      Hi, i am somewhat of a new programmer to visual basic... progamming knowledge at a bit of a sad low level. part of the program i am building requires the following: my so called client leases out spaces on pieces of land for whatever purpose, in a sort of perfect grid. firstly, the layout of how the land will be divided is loaded as a template to the system, details stored on database... total plot dimensions, and vertical and horizontal spaces is stored. the program generates a little grid display of what it might look like, thats simple enough. when the user requires a piece of land to be formatted according to his needs, the template is selected from database, new entry is created in a table dealing with active plots. for each sector of land, a serial number gets generated, each sector state set to "vacant". the problem on my part (due to my pathetic coding skills) comes in with coding the actual bookings part of the system. when the user selects the appropriate plot of land to perform bookings on, an interactive display of the plot needs be generated out of information in the database table. occupied sectors and vacant sectors in different colours, and the user needs to be able to highlight various (multiple) vacant sectors to book for his client. when "book" is clicked, the status field in the land plot table needs to be changed from "vacant" to "occupied". i have a very very vague idea on how this is to be done, but at the moment, am completely stuck. not a clue as to how to generate the plot of land on screen with the different colours from the information in the database table, and beyond that, how to make it "interactive" with mouse events annnnd how to program it to return the values of which sections were selected i'd really appreciate any suggestions. :doh:

      modified on Monday, August 18, 2008 8:22 PM

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      brajoez wrote:

      somewhat of a new programmer to visual basic

      brajoez wrote:

      my so called client

      brajoez wrote:

      due to my pathetic coding skills

      Why do you have a client if your skill level is so poor ? You basically need to handle the paint event, draw your land, track your mouse movement and actions and store changes back to the DB. I suspect you know that already, but if you do, I'd suggest making a start and asking specific questions as you get stuck. I'd be inclined to create a class that represents one object in the DB, and write it so that it responds to mouse events and knows how to draw itself, then call the draw code for your collection of objects in onpaint, and find the object your mouse is over in mouse events to pass it the event.

      Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

      CPalliniC 1 Reply Last reply
      0
      • C Christian Graus

        brajoez wrote:

        somewhat of a new programmer to visual basic

        brajoez wrote:

        my so called client

        brajoez wrote:

        due to my pathetic coding skills

        Why do you have a client if your skill level is so poor ? You basically need to handle the paint event, draw your land, track your mouse movement and actions and store changes back to the DB. I suspect you know that already, but if you do, I'd suggest making a start and asking specific questions as you get stuck. I'd be inclined to create a class that represents one object in the DB, and write it so that it responds to mouse events and knows how to draw itself, then call the draw code for your collection of objects in onpaint, and find the object your mouse is over in mouse events to pass it the event.

        Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

        CPalliniC Online
        CPalliniC Online
        CPallini
        wrote on last edited by
        #3

        Christian Graus wrote:

        Why do you have a client if your skill level is so poor ?

        Possibly because his strong marketing skills. :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [Image resize DLL]

        In testa che avete, signor di Ceprano?

        B 1 Reply Last reply
        0
        • CPalliniC CPallini

          Christian Graus wrote:

          Why do you have a client if your skill level is so poor ?

          Possibly because his strong marketing skills. :)

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [Image resize DLL]

          B Offline
          B Offline
          brajoez
          wrote on last edited by
          #4

          no my brother. this is africa. i am a plumber, electrician, mechanic and a carpenter as well. we do what it takes to make money. im not too good at the plumbing thing though... :)

          CPalliniC 1 Reply Last reply
          0
          • B brajoez

            no my brother. this is africa. i am a plumber, electrician, mechanic and a carpenter as well. we do what it takes to make money. im not too good at the plumbing thing though... :)

            CPalliniC Online
            CPalliniC Online
            CPallini
            wrote on last edited by
            #5

            brajoez wrote:

            this is africa.

            Your profile states USA. :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [Image resize DLL]

            In testa che avete, signor di Ceprano?

            B 1 Reply Last reply
            0
            • CPalliniC CPallini

              brajoez wrote:

              this is africa.

              Your profile states USA. :)

              If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
              This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
              [Image resize DLL]

              B Offline
              B Offline
              brajoez
              wrote on last edited by
              #6

              check my vhost buddy.

              CPalliniC 1 Reply Last reply
              0
              • B brajoez

                check my vhost buddy.

                CPalliniC Online
                CPalliniC Online
                CPallini
                wrote on last edited by
                #7

                brajoez wrote:

                my vhost

                :confused:

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                [My articles]

                In testa che avete, signor di Ceprano?

                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