Results 1 to 9 of 9

Thread: Graphic bar

  1. #1

    Thread Starter
    Addicted Member Cbomb's Avatar
    Join Date
    Jul 1999
    Posts
    153

    Lightbulb Info

    I think we need a lil more information to help you out. What part of the project do you need help on? What is its application?
    Cbomb
    Techie

  2. #2
    New Member
    Join Date
    Feb 2001
    Location
    England
    Posts
    5

    Red face Said again+Graphic Bar

    The project consists from two parts:
    1. Design hardware to detect the level water in a container of two litres, displaying the water level with seven segments led, and sending voltages, which represent the water level to an ADC card (Analogue Digital Converter).
    2. The software should convert the inputs from the ADC to equivalent in litres and millilitres, and the same time to present these information in a textbox in continuos mode, and adequate graphic bar in a picture control to display in continuos mode the water level.

    To present the solution I need to display numbers from 0 to 100in a textbox in random and continuous modes by a timer, and in same time the graphic bar display graphically the number displayed in the textbox in continuous mode.

    Said

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    1. You probably know more about this than me, but I know a bit about electronics. Judging by your first post, I'm guessing you dont need help on this one.

    2. Use Mid$ in a loop to find all of the numbers in the textbox, and to find the corresponding picture, use:

    Code:
    for i = 0 to numbercount
      picture(i).picture=LoadPicture(app.path & "\num" & numb(i) & ".bmp")
    next i
    Hope I helped!

    Cheers,
    Sastraxi
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  4. #4
    New Member
    Join Date
    Feb 2001
    Location
    England
    Posts
    5

    Wink To Mr Sastraxi

    Dear Mr Sastraxi;

    Your solution is a good one but to represent all the numbers I will need 100 image or picture to load, I thought maybe the solution can in creating a rubber line inside the picture control, in which the high of the line correspond to the value of number displayed in the textbox, like the representation of sound frequencies( which I am not able to do it), maybe I make a big mistake.

    Thank you

  5. #5
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    NO!

    Sorry. You will only need to make 10!

    pic1.bmp - the number 1
    pic2.bmp - the number 2
    ...
    ...
    ...
    and so on...
    ...
    ...
    ...
    pic9.bmp - the number 9
    pic0.bmp - the number 0

    And then you just pick & choose and display the numbers side by side.

    EG:

    A one, and a zero, and a zero make 100. You dont need 100 pictures.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  6. #6
    New Member
    Join Date
    Feb 2001
    Location
    England
    Posts
    5

    To Mr Sastraxi again,

    I am sorry to take your time, maybe i explain the problem in very bad way, you find with included a attached picture may be in this way my idea will be more clear.

    thank you

    said

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    a simple gauge:

    Picture1.line (0,picture1.scaleheight)-step(picture1.scalewidth,-number/(picture1.scalewidth*100)),vbred,bf
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  8. #8
    New Member
    Join Date
    Feb 2001
    Location
    England
    Posts
    5

    To Mr Sastraxi again,

    I am sorry to take your time, maybe i explain the problem in very bad way, you find with included a attached picture may be in this way my idea will be more clear.

    thank you

    said

  9. #9
    New Member
    Join Date
    Feb 2001
    Location
    England
    Posts
    5

    Question To Mr kedaman;

    Thank you i try this one.

    said

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width