Reading Graphs in VB

Posted on 2005-04-12
Last Modified: 2010-05-02
I've written a program that opens a wave file and displays the waveform to the audio. I've also got a Fourier Transform showing the frequencies of the sounds used in the wavefile.
My question is how can I read this graph. I basically want to write an If statements that say If the frequencies are above 200Hz change the colour of the line from red to green.
The fourier transform using picture.line (if thats of any use to you guys)

Along the X axis is frequency and the Y asix is amplitute

Question by:Bigfootuk
    LVL 9

    Accepted Solution

    well you will want to make and if statment like the following

    if WaveFrequency>200 then
    end if

    LVL 9

    Expert Comment

    Did I not properly answer the question?
    LVL 6

    Expert Comment

    unfortunately, no.
    You would have answered it if the question was "I have a drawing on a picturebox, how to change the entire color of it under a given condition" but a Fourier transform is an aggregation of many different 'lines' which represent multiple parameters, so the asker wants to know how to make the particular lines he has turn one color or another.  There could be as few as a couple, and as many as a few hundred depending on the analysis, so the answer here would be based on knowing how the line data generated and stored, and working towards tagging each line with color data.
    LVL 9

    Expert Comment

    The answer that I gave was based on the fact that he mentioned he was using a picture box to draw his graph and that he is using the line command. given the fact that if you change the forecolor it will only change the color of items drawn after the change in forecolor I would assume that the answer is correct.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now