Click here to Skip to main content
11,431,483 members (66,675 online)

Visual Basic

 
GeneralRe: fill a webpage from vb.net 2010 Pin
Paul Conrad24-Sep-12 16:47
memberPaul Conrad24-Sep-12 16:47 
GeneralRe: fill a webpage from vb.net 2010 Pin
alejx24-Sep-12 17:16
memberalejx24-Sep-12 17:16 
GeneralRe: fill a webpage from vb.net 2010 Pin
Paul Conrad24-Sep-12 17:19
memberPaul Conrad24-Sep-12 17:19 
GeneralRe: fill a webpage from vb.net 2010 Pin
alejx24-Sep-12 17:47
memberalejx24-Sep-12 17:47 
GeneralRe: fill a webpage from vb.net 2010 Pin
Paul Conrad24-Sep-12 17:53
memberPaul Conrad24-Sep-12 17:53 
GeneralRe: fill a webpage from vb.net 2010 Pin
alejx24-Sep-12 17:57
memberalejx24-Sep-12 17:57 
GeneralRe: fill a webpage from vb.net 2010 Pin
Paul Conrad24-Sep-12 18:00
memberPaul Conrad24-Sep-12 18:00 
QuestionSocket Voice Chat Pin
Member 769141624-Sep-12 5:33
memberMember 769141624-Sep-12 5:33 
AnswerRe: Socket Voice Chat Pin
Eddy Vluggen24-Sep-12 5:49
memberEddy Vluggen24-Sep-12 5:49 
GeneralRe: Socket Voice Chat Pin
Member 769141624-Sep-12 6:03
memberMember 769141624-Sep-12 6:03 
AnswerRe: Socket Voice Chat Pin
Eddy Vluggen24-Sep-12 6:08
memberEddy Vluggen24-Sep-12 6:08 
QuestionHow can I do to make my vb player be able to play in a specific portion of time Pin
sosthenes paul21-Sep-12 1:52
membersosthenes paul21-Sep-12 1:52 
AnswerRe: How can I do to make my vb player be able to play in a specific portion of time Pin
Eddy Vluggen21-Sep-12 4:07
memberEddy Vluggen21-Sep-12 4:07 
QuestionVisable Line Draw Pin
Member 939749920-Sep-12 22:25
memberMember 939749920-Sep-12 22:25 
Hello, i need help with this code to make the line visable as drawing and not just after. any help would be great
Public Class Form1
     
        'The lines that have been drawn but not saved.
        Private lines As New List(Of Line)
     
        'The start point of the line currently being drawn.
        Private start As Point
     
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            'Place a blank image in the PictureBox control.
            Me.PictureBox1.Image = New Bitmap(Me.PictureBox1.Width, Me.PictureBox1.Height)
        End Sub
     
        Private Sub PictureBox1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
            'Remember the point at which the line started.
            Me.start = e.Location
        End Sub
     
        Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
            'Remember the point at which the line ended.
            Dim [end] As Point = e.Location
     
            'Add the new line to the list.
            Me.lines.Add(New Line(Me.start, [end]))
     
            Dim area As New Rectangle(Math.Min(Me.start.X, [end].X), _
                                      Math.Min(Me.start.Y, [end].Y), _
                                      Math.Abs(Me.start.X - [end].X), _
                                      Math.Abs(Me.start.Y - [end].Y))
     
            'Inflate the rectangle by 1 pixel in each direction to ensure every changed pixel will be redrawn.
            area.Inflate(1, 1)
     
            'Force the control to repaint so the new line is drawn.
            Me.PictureBox1.Invalidate(area)
            Me.PictureBox1.Update()
        End Sub
     
        Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
            'Draw each line on the control.
            Me.DrawLines(e.Graphics)
        End Sub
     
        Private Sub Save()
            'Create a Graphics object from the Image in the PictureBox.
            Using g As Graphics = Graphics.FromImage(Me.PictureBox1.Image)
                'Draw each line on the image to make them permanent.
                Me.DrawLines(g)
            End Using
     
            'Clear the temporary lines that were just saved.
            Me.Clear()
        End Sub
     
        Private Sub Clear()
            'Clear all unsaved lines.
            Me.lines.Clear()
     
            'Force the control to repaint so the lines are removed.
            Me.PictureBox1.Refresh()
        End Sub
     
        Private Sub DrawLines(ByVal g As Graphics)
            For Each line As Line In Me.lines
                g.DrawLine(Pens.Black, line.Start, line.End)
            Next line
        End Sub
     
    End Class
     
    Public Class Line
     
        'The line's start point.
        Private _start As Point
     
        'The line's end point.
        Private _end As Point
     
        'The line's start point.
        Public Property Start() As Point
            Get
                Return Me._start
            End Get
            Set(ByVal value As Point)
                Me._start = value
            End Set
        End Property
     
        'The line's end point.
        Public Property [End]() As Point
            Get
                Return Me._end
            End Get
            Set(ByVal value As Point)
                Me._end = value
            End Set
        End Property
     
        Public Sub New()
            Me.New(Point.Empty, Point.Empty)
        End Sub
     
        Public Sub New(ByVal start As Point, ByVal [end] As Point)
            Me._start = start
            Me._end = [end]
        End Sub
     
    End Class

AnswerRe: Visable Line Draw Pin
Eddy Vluggen21-Sep-12 4:02
memberEddy Vluggen21-Sep-12 4:02 
GeneralRe: Visable Line Draw Pin
Member 939749921-Sep-12 9:56
memberMember 939749921-Sep-12 9:56 
GeneralRe: Visable Line Draw Pin
Richard MacCutchan21-Sep-12 22:19
mvpRichard MacCutchan21-Sep-12 22:19 
GeneralRe: Visable Line Draw Pin
Eddy Vluggen21-Sep-12 23:53
memberEddy Vluggen21-Sep-12 23:53 
AnswerRe: Visable Line Draw Pin
Richard MacCutchan21-Sep-12 4:20
mvpRichard MacCutchan21-Sep-12 4:20 
Questionvb 6.0 API Pin
Ainnop20-Sep-12 5:15
memberAinnop20-Sep-12 5:15 
AnswerRe: vb 6.0 API Pin
Wes Aday20-Sep-12 5:26
memberWes Aday20-Sep-12 5:26 
GeneralRe: vb 6.0 API Pin
Ainnop20-Sep-12 5:46
memberAinnop20-Sep-12 5:46 
AnswerRe: vb 6.0 API Pin
Eddy Vluggen20-Sep-12 5:48
memberEddy Vluggen20-Sep-12 5:48 
GeneralRe: vb 6.0 API Pin
Wes Aday20-Sep-12 5:52
memberWes Aday20-Sep-12 5:52 
GeneralRe: vb 6.0 API Pin
Member 939749921-Sep-12 9:51
memberMember 939749921-Sep-12 9:51 
GeneralRe: vb 6.0 API Pin
Wes Aday21-Sep-12 9:54
memberWes Aday21-Sep-12 9:54 
AnswerRe: vb 6.0 API Pin
Joan Murt20-Sep-12 7:37
memberJoan Murt20-Sep-12 7:37 
Questionvb 2008 methods Pin
dcof18-Sep-12 9:28
memberdcof18-Sep-12 9:28 
AnswerRe: vb 2008 methods Pin
Richard MacCutchan18-Sep-12 10:44
mvpRichard MacCutchan18-Sep-12 10:44 
GeneralRe: vb 2008 methods Pin
dcof19-Sep-12 5:04
memberdcof19-Sep-12 5:04 
GeneralRe: vb 2008 methods Pin
Steven St. John19-Sep-12 5:19
memberSteven St. John19-Sep-12 5:19 
AnswerRe: vb 2008 methods Pin
Paul Conrad19-Sep-12 6:33
memberPaul Conrad19-Sep-12 6:33 
QuestionBytes overflowing despite modulo... [Solved] [modified] Pin
SixOfTheClock16-Sep-12 14:28
memberSixOfTheClock16-Sep-12 14:28 
AnswerRe: Bytes overflowing despite modulo... Pin
Dave Kreskowiak16-Sep-12 18:46
mvpDave Kreskowiak16-Sep-12 18:46 
GeneralRe: Bytes overflowing despite modulo... Pin
SixOfTheClock17-Sep-12 0:22
memberSixOfTheClock17-Sep-12 0:22 
QuestionUpdater Help [modified] Pin
Bryan Muschter16-Sep-12 11:10
memberBryan Muschter16-Sep-12 11:10 
AnswerRe: Updater Help Pin
SixOfTheClock16-Sep-12 14:43
memberSixOfTheClock16-Sep-12 14:43 
GeneralRe: Updater Help Pin
Bryan Muschter16-Sep-12 17:52
memberBryan Muschter16-Sep-12 17:52 
AnswerRe: Updater Help Pin
Paul Conrad16-Sep-12 18:26
memberPaul Conrad16-Sep-12 18:26 
GeneralRe: Updater Help Pin
Bryan Muschter17-Sep-12 16:01
memberBryan Muschter17-Sep-12 16:01 
QuestionPrintPreviewControl InvalidatePreview wont triger Pin
jan212r16-Sep-12 9:40
memberjan212r16-Sep-12 9:40 
Questionshape of number Pin
memas6316-Sep-12 7:24
membermemas6316-Sep-12 7:24 
AnswerRe: shape of number Pin
Wes Aday16-Sep-12 7:44
memberWes Aday16-Sep-12 7:44 
GeneralRe: shape of number Pin
memas6316-Sep-12 8:00
membermemas6316-Sep-12 8:00 
GeneralRe: shape of number Pin
Wes Aday16-Sep-12 8:08
memberWes Aday16-Sep-12 8:08 
GeneralRe: shape of number Pin
memas6316-Sep-12 8:13
membermemas6316-Sep-12 8:13 
GeneralRe: shape of number Pin
Wes Aday16-Sep-12 8:18
memberWes Aday16-Sep-12 8:18 
GeneralRe: shape of number Pin
memas6316-Sep-12 8:19
membermemas6316-Sep-12 8:19 
GeneralRe: shape of number Pin
Steven St. John16-Sep-12 17:03
memberSteven St. John16-Sep-12 17:03 
GeneralRe: shape of number Pin
memas6317-Sep-12 1:42
membermemas6317-Sep-12 1:42 

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

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


Advertise | Privacy | Mobile
Web02 | 2.8.150428.2 | Last Updated 4 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid