Dear All,
I need to draw the analog Sine wave in picture control. how to draw in vb code.
Advance Thanks,
K.Babu
Printable View
Dear All,
I need to draw the analog Sine wave in picture control. how to draw in vb code.
Advance Thanks,
K.Babu
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
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
Quote:
Originally Posted by WizBang
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.Quote:
Originally Posted by K.Babu