[ Updated threads · New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
[VB.NET] MI_DrawLine
DominusDate: Wednesday, 28/08/2013, 4:36 PM | Message # 1
Generalissimo
Group: Administrators
Messages: 7
Reputation: 0
Status: Offline
With This Function You can create Line With Color And Size, Possition
    R1 = RGB - RED color
    G1 = RGB - GREEN color
    B1 = RGB - BLUE color
    L1 = size of line
    X1,Y1 = START coordinates possition
    X2,Y2 = ENDS coordinate possition
    x = Bitmap Name


Code
Dim Style_x As New Bitmap(630, 24) 'As bitmap
Private Function MI_DrawLine(R1 As Integer, G1 As Integer, B1 As Integer, L1 As Integer, X1 As Integer, Y1 As Integer,  X2 As Integer,  Y2 As Integer, x As Bitmap) As Bitmap
           'With This Function You can create Line With Color And Size, Possition
           'R1 = RGB - RED color
           'G1 = RGB - GREEN color
           'B1 = RGB - BLUE color
           'L1 = size of line
           'X1,Y1 = START coordinates possition
           'X2,Y2 = ENDS coordinate possition
           'x = Bitmap Name
           Dim style_g As Graphics = Graphics.FromImage(x)
           Dim MIpen_color As New Pen(Color.FromArgb(R1, G1, B1), L1)
           style_g.DrawLine(MIpen_color, X1, Y1, X2, Y2)
End Function

MI_DrawLine(255, 255, 255, 1, 0, 0, 630, 0, Style_x)
PictureBox1.Image = style_x


If you are using this code, use our Credits.

Quote
Author: MIDominus
Web: mi.ucoz.com
Year: 2013
 
  • Page 1 of 1
  • 1
Search: