Click here to Skip to main content
15,918,193 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Windows service and dependencies Pin
KreativeKai10-Oct-08 8:47
professionalKreativeKai10-Oct-08 8:47 
GeneralRe: Windows service and dependencies Pin
jzonthemtn10-Oct-08 8:50
jzonthemtn10-Oct-08 8:50 
GeneralRe: Windows service and dependencies Pin
KreativeKai10-Oct-08 9:31
professionalKreativeKai10-Oct-08 9:31 
QuestionQuestion about objects and forms Pin
sa_runner10-Oct-08 7:57
sa_runner10-Oct-08 7:57 
AnswerRe: Question about objects and forms Pin
Wendelius10-Oct-08 8:06
mentorWendelius10-Oct-08 8:06 
GeneralRe: Question about objects and forms Pin
sa_runner12-Oct-08 18:00
sa_runner12-Oct-08 18:00 
GeneralRe: Question about objects and forms Pin
Wendelius13-Oct-08 5:17
mentorWendelius13-Oct-08 5:17 
Questionhow to draw a line on a picture box Pin
flamingo210-Oct-08 3:12
flamingo210-Oct-08 3:12 
I want to draw a line on a picture box, when mouse key is pressed it will save the current position and when mouse key is released it will draw a line up till that point. but my code is not working, can any body help me out of this.

[code]
Public Class Form1
Dim x1, y1, x2, y2 As Integer

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


End Sub

Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
x1 = MousePosition.X
y1 = MousePosition.Y
End Sub

Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
x2 = MousePosition.X
y2 = MousePosition.Y
End Sub


Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint

e.Graphics.DrawLine(Pens.Black, x1, y1, x2, y2)


End Sub
End Class

[end code]


thanks in advance
Fareed
AnswerRe: how to draw a line on a picture box Pin
Thomas Stockwell10-Oct-08 4:29
professionalThomas Stockwell10-Oct-08 4:29 
AnswerRe: how to draw a line on a picture box Pin
C1AllenS10-Oct-08 4:55
C1AllenS10-Oct-08 4:55 
GeneralRe: how to draw a line on a picture box Pin
flamingo210-Oct-08 9:49
flamingo210-Oct-08 9:49 
Generalhow to draw a rectangle on a pictureBox Pin
flamingo210-Oct-08 20:05
flamingo210-Oct-08 20:05 
Questionweb browser Pin
Shazz Rock10-Oct-08 0:45
Shazz Rock10-Oct-08 0:45 
AnswerRe: web browser Pin
jzonthemtn10-Oct-08 3:52
jzonthemtn10-Oct-08 3:52 
GeneralRe: web browser Pin
LloydA11110-Oct-08 8:37
LloydA11110-Oct-08 8:37 
QuestionControls and threads problem Pin
ambio9-Oct-08 22:52
ambio9-Oct-08 22:52 
AnswerRe: Controls and threads problem Pin
Dave Kreskowiak10-Oct-08 1:04
mveDave Kreskowiak10-Oct-08 1:04 
GeneralRe: Controls and threads problem Pin
ambio10-Oct-08 4:40
ambio10-Oct-08 4:40 
GeneralRe: Controls and threads problem Pin
Dave Kreskowiak10-Oct-08 5:14
mveDave Kreskowiak10-Oct-08 5:14 
GeneralRe: Controls and threads problem Pin
ambio12-Oct-08 22:34
ambio12-Oct-08 22:34 
GeneralRe: Controls and threads problem Pin
Dave Kreskowiak13-Oct-08 1:27
mveDave Kreskowiak13-Oct-08 1:27 
GeneralRe: Controls and threads problem Pin
ambio13-Oct-08 2:13
ambio13-Oct-08 2:13 
QuestionTransaction AS400 Pin
helelark1239-Oct-08 20:32
helelark1239-Oct-08 20:32 
AnswerRe: Transaction AS400 Pin
Ashfield9-Oct-08 21:34
Ashfield9-Oct-08 21:34 
GeneralRe: Transaction AS400 Pin
Mycroft Holmes9-Oct-08 21:41
professionalMycroft Holmes9-Oct-08 21:41 

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.