Click here to Skip to main content
16,008,490 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
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 
Hi,
I need the user to draw line in panel control placed in form. For that I have defined mousedown, mouseup and mousemove events. But it draws the line continously, I need it to be as like drawing line in paint brush.

Dim oldX, oldY As Integer
Dim m_Down As Boolean

Private Sub Panel1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown
oldX = e.X
oldY = e.Y
m_Down = True
End Sub

Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
If m_Down = True Then
Dim p As Point
Dim g As Graphics
Dim pn As Pen
p = New Point(e.X, e.Y)
g = Graphics.FromHwnd(Panel1.Handle)
pn = New Pen(Color.Red, 1)
g.DrawLine(pn, oldX, oldY, e.X, e.Y)
pn.Dispose()
g.Dispose()
End If
End Sub

Private Sub Panel1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseUp
m_Down = False
End Sub

Any help?

Be simple and Be sample.

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 
GeneralRe: Urgent ! Free Hand Drawing Pin
Christian Graus31-Jan-07 8:47
protectorChristian Graus31-Jan-07 8:47 
QuestionMDI Form Pin
skandaapriya30-Jan-07 23:18
skandaapriya30-Jan-07 23:18 

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.