Click here to Skip to main content
15,911,789 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questiondatatype [modified] Pin
Ankit Aneja14-May-09 5:48
Ankit Aneja14-May-09 5:48 
AnswerRe: datatype Pin
Dave Kreskowiak14-May-09 7:12
mveDave Kreskowiak14-May-09 7:12 
GeneralRe: datatype Pin
Zaegra14-May-09 8:56
Zaegra14-May-09 8:56 
GeneralRe: datatype Pin
Dave Kreskowiak14-May-09 9:33
mveDave Kreskowiak14-May-09 9:33 
GeneralRe: datatype Pin
Zaegra14-May-09 11:17
Zaegra14-May-09 11:17 
Questionplz help me in VB to drow in picture box Pin
laila_B14-May-09 4:43
laila_B14-May-09 4:43 
AnswerRe: plz help me in VB to drow in picture box Pin
scottgp14-May-09 4:49
professionalscottgp14-May-09 4:49 
GeneralRe: plz help me in VB to drow in picture box Pin
laila_B15-May-09 8:28
laila_B15-May-09 8:28 
Thanx dear 4 replay but I am not wait smbody 2 do the work 4 me i am tryiny but the problme is when i run the form i drow in form it self not in picture box the follwing is code if u can help me


Public Class form2
Dim shouldpaint As Boolean = True
Dim paintcolor As Color
Dim paintwidth As Integer = 5
Dim drawpen As Pen
Dim paintline As New System.Drawing.Drawing2D.GraphicsPath()

Private Sub Picturedrowing_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Picturedrowing.Click


End Sub

Private Sub Picturedrowing_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Picturedrowing.MouseDown
shouldpaint = True
End Sub

Private Sub Picturedrowing_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Picturedrowing.MouseMove

If (shouldpaint) Then
Dim g As Graphics = CreateGraphics()
g.FillEllipse(New SolidBrush(Color.Red), e.X, e.Y, 30, 30)
g.Dispose()
End If
End Sub

Private Sub Picturedrowing_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Picturedrowing.MouseUp
shouldpaint = False
End Sub

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

End Sub

Private Sub lstwidth_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstwidth.SelectedIndexChanged
If Me.lstwidth.SelectedIndex = 0 Then
paintwidth = 5
ElseIf Me.lstwidth.SelectedIndex = 1 Then
paintwidth = 10

'using if statment to select diffrent width
ElseIf Me.lstwidth.SelectedIndex = 2 Then
paintwidth = 15
'ElseIf Me.lstwidth.SelectedIndex = 3 Then
' paintwidth = 16

End If
End Sub

Private Sub lstcolor_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstcolor.SelectedIndexChanged
'using if statment to select diffrent color

If Me.lstcolor.SelectedIndex = 0 Then
paintcolor = (System.Drawing.Color.Brown)

ElseIf Me.lstcolor.SelectedIndex = 1 Then
'using if statment to select diffrent color

paintcolor = (System.Drawing.Color.Blue)
ElseIf Me.lstcolor.SelectedIndex = 2 Then
paintcolor = (System.Drawing.Color.Red)

ElseIf Me.lstcolor.SelectedIndex = 3 Then
paintcolor = (System.Drawing.Color.Azure)
End If
End Sub

Private Sub Picturedrowing_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Picturedrowing.Paint
'Dim move = New Pen(Color.FromArgb(100, paintcolor), paintwidth)

'e.Graphics.DrawPath(move, paintline)

End Sub

Private Sub btnclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclear.Click
Me.Picturedrowing.Refresh()
End Sub

Private Sub btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexit.Click
Me.Close()
End Sub
End Class
AnswerRe: plz help me in VB to drow in picture box Pin
DidiKunz14-May-09 4:54
DidiKunz14-May-09 4:54 
AnswerRe: plz help me in VB to drow in picture box Pin
Jon_Boy14-May-09 5:11
Jon_Boy14-May-09 5:11 
GeneralRe: plz help me in VB to drow in picture box Pin
Mycroft Holmes14-May-09 16:47
professionalMycroft Holmes14-May-09 16:47 
AnswerRe: plz help me in VB to drow in picture box Pin
Steven J Jowett14-May-09 5:36
Steven J Jowett14-May-09 5:36 
GeneralRe: plz help me in VB to drow in picture box Pin
EliottA14-May-09 5:47
EliottA14-May-09 5:47 
GeneralRe: plz help me in VB to drow in picture box Pin
Mycroft Holmes14-May-09 16:51
professionalMycroft Holmes14-May-09 16:51 
AnswerRe: plz help me in VB to drow in picture box Pin
Dave Kreskowiak14-May-09 7:10
mveDave Kreskowiak14-May-09 7:10 
AnswerRe: plz help me in VB to drow in picture box Pin
Zaegra14-May-09 9:03
Zaegra14-May-09 9:03 
AnswerRe: plz help me in VB to drow in picture box Pin
LloydA11115-May-09 13:11
LloydA11115-May-09 13:11 
Questionviewport to window mapping Pin
suvigna14-May-09 4:29
suvigna14-May-09 4:29 
AnswerRe: viewport to window mapping Pin
DidiKunz14-May-09 4:58
DidiKunz14-May-09 4:58 
GeneralRe: viewport to window mapping Pin
suvigna14-May-09 5:08
suvigna14-May-09 5:08 
QuestionRetrive data from .dbf based on 2 fields in Text file Pin
vijay248214-May-09 4:24
vijay248214-May-09 4:24 
AnswerRe: Retrive data from .dbf based on 2 fields in Text file Pin
Henry Minute14-May-09 8:13
Henry Minute14-May-09 8:13 
GeneralRe: Retrive data from .dbf based on 2 fields in Text file Pin
vijay248214-May-09 9:45
vijay248214-May-09 9:45 
QuestionHow to:Error providers Pin
Gram Letoaba14-May-09 4:16
Gram Letoaba14-May-09 4:16 
AnswerRe: How to:Error providers Pin
Jay Royall14-May-09 4:20
Jay Royall14-May-09 4:20 

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.