Click here to Skip to main content
15,892,674 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How do you adjust graph Axes? Pin
CPallini31-Jan-07 7:47
mveCPallini31-Jan-07 7:47 
GeneralRe: How do you adjust graph Axes? Pin
KojoAmuel31-Jan-07 8:04
KojoAmuel31-Jan-07 8:04 
GeneralRe: How do you adjust graph Axes? Pin
CPallini31-Jan-07 9:02
mveCPallini31-Jan-07 9:02 
GeneralRe: How do you adjust graph Axes? Pin
KojoAmuel31-Jan-07 9:23
KojoAmuel31-Jan-07 9:23 
GeneralRe: How do you adjust graph Axes? Pin
CPallini31-Jan-07 11:03
mveCPallini31-Jan-07 11:03 
GeneralRe: How do you adjust graph Axes? Pin
KojoAmuel1-Feb-07 2:37
KojoAmuel1-Feb-07 2:37 
QuestionUrgent Free Hand Drawing - Modified Pin
TheApocalypse31-Jan-07 2:41
TheApocalypse31-Jan-07 2:41 
AnswerRe: Urgent Free Hand Drawing - Modified Pin
xstoneheartx31-Jan-07 6:36
xstoneheartx31-Jan-07 6:36 
1- Create a form and Add a picturebox named PictureBox1
2- Add these codes to your form
------------
Private m_MouseIsDown As Boolean
Private m_Points() As Point
Dim m_path As New Drawing2D.GraphicsPath
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
m_Points = New Point() {New Point(e.X, e.Y)}
m_MouseIsDown = True
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If m_MouseIsDown Then
ReDim Preserve m_Points(m_Points.Length)
m_Points(m_Points.Length - 1) = New Point(e.X, e.Y)
Me.PictureBox1.Invalidate()
End If
End Sub
Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
m_path.StartFigure()
m_path.AddCurve(m_Points)
m_MouseIsDown = False
Me.PictureBox1.Invalidate()
End Sub
Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
If m_Points IsNot Nothing Then
Using p As New System.Drawing.Pen(Color.Blue, 2)
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias
e.Graphics.DrawPath(p, m_path)
e.Graphics.DrawCurve(p, m_Points)
End Using
End If
End Sub
------------

3- Run your project
now by downing mouse left key and moving mouse, your freehand drawing is painting.

AnswerRe: Urgent Free Hand Drawing - Modified Pin
Christian Graus31-Jan-07 8:49
protectorChristian Graus31-Jan-07 8:49 
QuestionWhat's wrong in my code? Pin
.NetRams31-Jan-07 1:32
.NetRams31-Jan-07 1:32 
AnswerRe: What's wrong in my code? Pin
Dave Sexton31-Jan-07 3:21
Dave Sexton31-Jan-07 3:21 
GeneralRe: What's wrong in my code? Pin
Guffa31-Jan-07 5:59
Guffa31-Jan-07 5:59 
AnswerRe: What's wrong in my code? Pin
Christian Graus31-Jan-07 9:19
protectorChristian Graus31-Jan-07 9:19 
GeneralRe: What's wrong in my code? Pin
.NetRams31-Jan-07 17:08
.NetRams31-Jan-07 17:08 
AnswerRe: What's wrong in my code? Pin
TwoFaced31-Jan-07 18:45
TwoFaced31-Jan-07 18:45 
Questionreal time graphics in VB.net from serial port Pin
2of10031-Jan-07 0:50
2of10031-Jan-07 0:50 
AnswerRe: real time graphics in VB.net from serial port Pin
Johan Hakkesteegt1-Feb-07 2:47
Johan Hakkesteegt1-Feb-07 2:47 
QuestionHow to enable users to draw line on windows form vb.net? Pin
.NetRams31-Jan-07 0:11
.NetRams31-Jan-07 0:11 
AnswerRe: How to enable users to draw line on windows form vb.net? Pin
Christian Graus31-Jan-07 0:23
protectorChristian Graus31-Jan-07 0:23 
Question.Net Framework Pin
Manas'30-Jan-07 23:51
Manas'30-Jan-07 23:51 
AnswerRe: .Net Framework Pin
Meg W31-Jan-07 2:09
Meg W31-Jan-07 2:09 
Question[Message Deleted] Pin
TheApocalypse30-Jan-07 23:25
TheApocalypse30-Jan-07 23:25 
AnswerRe: Urgent ! Free Hand Drawing Pin
TwoFaced30-Jan-07 23:41
TwoFaced30-Jan-07 23:41 
AnswerRe: Urgent ! Free Hand Drawing Pin
Christian Graus31-Jan-07 0:04
protectorChristian Graus31-Jan-07 0:04 
GeneralRe: Urgent ! Free Hand Drawing Pin
.NetRams31-Jan-07 1:40
.NetRams31-Jan-07 1:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.