|
-
September 27th, 2004, 06:11 AM
#1
how to Draw the analog Sine wave in vb picture control.
Dear All,
I need to draw the analog Sine wave in picture control. how to draw in vb code.
Advance Thanks,
K.Babu
Last edited by K.Babu; September 27th, 2004 at 07:58 AM.
Please avoid sending emails to my personal mail:
write your doubts as thread in Codeguru
Crystal Reports Forum.
This will help all people having similar matters, and will let people who know solutions on the specific topic
share their knowledge.
Visit my company web site (Qmax Test Equipments Private Limited)
Yours friendly,
K.Babu
-
September 27th, 2004, 08:01 AM
#2
Re: how to Draw the analog Sine wave in vb picture control.
Try this example:
Code:
Private Sub Form_Resize()
Dim I&, Speed!, Amplitude&, Y1&
Speed = 0.002: Amplitude = Me.ScaleHeight / 2 - 100
Me.Cls
For I = 0 To Me.ScaleWidth
Y1 = Sin(I * Speed) * Amplitude
Me.PSet (I, Y1 + Amplitude + 100), 0
Next
End Sub
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
September 27th, 2004, 09:04 AM
#3
Re: how to Draw the analog Sine wave in vb picture control.
Hi,
Thanks for you sample code.
Is it possible to increase the picture control width size more then 32,767 pixels, so that i can draw full diagram picture and scroll whereever i need.
Once again thanks for you help.
Advance Thanks,
K.Babu
 Originally Posted by WizBang
Try this example:
Code:
Private Sub Form_Resize()
Dim I&, Speed!, Amplitude&, Y1&
Speed = 0.002: Amplitude = Me.ScaleHeight / 2 - 100
Me.Cls
For I = 0 To Me.ScaleWidth
Y1 = Sin(I * Speed) * Amplitude
Me.PSet (I, Y1 + Amplitude + 100), 0
Next
End Sub
Please avoid sending emails to my personal mail:
write your doubts as thread in Codeguru
Crystal Reports Forum.
This will help all people having similar matters, and will let people who know solutions on the specific topic
share their knowledge.
Visit my company web site (Qmax Test Equipments Private Limited)
Yours friendly,
K.Babu
-
September 29th, 2004, 05:38 PM
#4
Re: how to Draw the analog Sine wave in vb picture control.
 Originally Posted by K.Babu
Hi,
Thanks for you sample code.
Is it possible to increase the picture control width size more then 32,767 pixels, so that i can draw full diagram picture and scroll whereever i need.
Once again thanks for you help.
Advance Thanks,
K.Babu
I don't believe so. Perhaps two pictureboxes side by side can do what you want. Perhaps a better alternative is to scale the image to fit in a more user-friendly size, and allow the user to zoom in to see details. In this way, drawing can be faster because you will not have so much to draw.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|