Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 904
  • Last Modified:

Plot Graph

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
vijeyashok
Asked:
vijeyashok
1 Solution
 
JacamarCommented:
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
 
bubonusCommented:
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
 
CleanupPingCommented:
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
 
DanRollinsCommented:
Moderator, my recommended disposition is:

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

DanRollins -- EE database cleanup volunteer
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now