?
Solved

Plot Graph

Posted on 2003-03-10
4
Medium Priority
?
903 Views
Last Modified: 2008-03-17
Hello,
 I ve tried for a program for Frequency ,amplitude modulation & demodulation using MSchart control, can any one help me how to draw a graph without using that component ,thats using Pset(x,y) ?????????

I want Complete source program , can any one help me ,,,,,,?????????????
 
0
Comment
Question by:vijeyashok
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 2

Expert Comment

by:Jacamar
ID: 8103641
so you want to create your own chart in visual basic, and without using MSchart control?   I suggest a picturebox, or a form to do this.  You can scale the form or picbox very easily, and use your x and y co-ordinates to draw accurate graphs.
0
 

Accepted Solution

by:
bubonus earned 80 total points
ID: 8110533
Hi,
here is an example of how this can be done.
To draw y=sin(x) curve in a picturebox called by default Picture1, put the following on the form :

Private Sub Form_Activate()
    Dim x As Single, y As Single
    Const Pi = 3.1416
    Const Xmin = 0, Xmax = 2 * Pi, Ymin = -1, Ymax = 1
    Picture1.Scale (Xmin, Ymax)-(Xmax, Ymin)
    Picture1.PSet (0, 0)
    For x = Xmin To Xmax Step 0.01
        y = Sin(x)
        Picture1.Line -(x, y)
    Next x
End Sub
0
 

Expert Comment

by:CleanupPing
ID: 8900399
vijeyashok:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9074654
Moderator, my recommended disposition is:

    Accept bubonus's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

770 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