Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class layle
- Inherits Control
- Sub New()
- Me.DoubleBuffered = True
- BackColor = Color.FromArgb(163, 191, 57)
- End Sub
- Property TextColor As Color = Color.FromArgb(242, 253, 180)
- Property VoteColor As Color = Color.White
- Property Comment As String = "Hello sexy little Layle. I would like you to give me a thick ham-burgerlyr and fist me like daddy does every night mmmm tasty LAwl."
- Property VoteInt As Integer = 0
- Property _Location As String = "USA"
- Property Duration As String = "11m"
- Private Sub layle_MouseDown(sender As Object, e As MouseEventArgs) Handles Me.MouseDown
- If New Rectangle(Me.Width - 35, (Me.Height / 2) - 20, 35, 25).Contains(e.X, e.Y) Then
- VoteInt += 1
- Me.Refresh()
- End If
- If New Rectangle(Me.Width - 35, (Me.Height / 2) + 17, 35, 25).Contains(e.X, e.Y) Then
- VoteInt -= 1
- Me.Refresh()
- End If
- End Sub
- Private Sub layle_MouseMove(sender As Object, e As MouseEventArgs) Handles Me.MouseMove
- If New Rectangle(Me.Width - 35, (Me.Height / 2) - 20, 35, 25).Contains(e.X, e.Y) Or New Rectangle(Me.Width - 35, (Me.Height / 2) + 17, 35, 25).Contains(e.X, e.Y) Then
- Cursor = Cursors.Hand
- Else
- Cursor = Cursors.Arrow
- End If
- End Sub
- Private Sub layle_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
- Dim g As Graphics = e.Graphics
- g.Clear(BackColor)
- g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
- g.DrawString(Comment, New Font("Arial", 12, FontStyle.Regular), New SolidBrush(TextColor), New Rectangle(8, 8, Me.Width - 35, Me.Height - 20))
- g.DrawString(VoteInt, New Font("Arial", 16, FontStyle.Regular), New SolidBrush(VoteColor), New Rectangle(Me.Width - 40, (Me.Height / 2) - 3, 40, 20), New StringFormat With {.Alignment = StringAlignment.Center, .LineAlignment = StringAlignment.Center})
- g.DrawLine(New Pen(VoteColor, 5), New Point(Me.Width - 35, (Me.Height / 2) - 7), New Point(Me.Width - 20, (Me.Height / 2) - 20))
- g.DrawLine(New Pen(VoteColor, 5), New Point(Me.Width - 22, (Me.Height / 2) - 20), New Point(Me.Width - 7, (Me.Height / 2) - 7))
- g.DrawLine(New Pen(VoteColor, 5), New Point(Me.Width - 35, (Me.Height / 2) + 17), New Point(Me.Width - 20, (Me.Height / 2) + 27))
- g.DrawLine(New Pen(VoteColor, 5), New Point(Me.Width - 22, (Me.Height / 2) + 27), New Point(Me.Width - 9, (Me.Height / 2) + 17))
- g.DrawString(Duration, New Font("Arial", 8, FontStyle.Regular), New SolidBrush(TextColor), New Rectangle(Me.Width - 35, Me.Height - 20, 35, 25))
- g.DrawString(_Location, New Font("Arial", 8, FontStyle.Regular), New SolidBrush(TextColor), New Rectangle(25, Me.Height - 20, Me.Width - 45, 25))
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment