Click here to Skip to main content
15,921,959 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Datagrid Adding a Row throw a Add Buttom Pin
rudy.net17-May-05 19:27
rudy.net17-May-05 19:27 
GeneralGet only part of a text file Pin
dvmarques2516-May-05 3:33
dvmarques2516-May-05 3:33 
GeneralRe: Get only part of a text file Pin
carlos_rocha16-May-05 3:47
carlos_rocha16-May-05 3:47 
GeneralRe: Get only part of a text file Pin
dvmarques2516-May-05 3:57
dvmarques2516-May-05 3:57 
GeneralRe: Get only part of a text file Pin
carlos_rocha16-May-05 4:17
carlos_rocha16-May-05 4:17 
GeneralRe: Get only part of a text file Pin
dvmarques2516-May-05 22:52
dvmarques2516-May-05 22:52 
GeneralRe: Get only part of a text file Pin
carlos_rocha17-May-05 0:21
carlos_rocha17-May-05 0:21 
GeneralFreehand drawing in VB.NET Pin
meghadwivedi16-May-05 2:51
meghadwivedi16-May-05 2:51 
By using below code I will be doing drawing on paint event of picturebox, although it is drawing perfectly but not as free hand drawing.

code:
Enum PathColor
BLUE1 = 0
blue2 = 1
blue3 = 2
blue4 = 3
GREEN1 = 4
green2 = 5
green3 = 6
green4 = 7
RED1 = 8
red2 = 9
red3 = 10
red4 = 11
white1 = 12
black1 = 13

End Enum
Enum pathwidth

blue1w = 0
blue2w = 1
blue3w = 2
blue4w = 3
green1w = 4
green2w = 5
green3w = 6
green4w = 7
red1w = 8
red2w = 9
red3w = 10
red4w = 11
whitew = 12
blackw = 13
'five = 0
'fifteen = 1
End Enum

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Create GraphicsPath for each color
'Me.picboard.BackColor = System.Drawing.Color.White
'Me.picboard.ForeColor = System.Drawing.Color.White
Dim pmb As Bitmap = picboard.Image
pmb.MakeTransparent()
'Me.picboard.BackgroundImage = Me.picboard.Image
For i As Integer = 0 To 13
path(i) = New GraphicsPath
'path(i).Reset()
Next i
' Create each color
'Dim myPen As Pen = New Pen(Color.FromArgb(64, Color.Orange), 16)

' myUserColor(PathColor.RED1) = myUserColor(PathColor.RED1).Red.Transparent
myUserColor(PathColor.RED1) = myUserColor(PathColor.RED1).Transparent.Red
myUserColor(PathColor.red2) = myUserColor(PathColor.red2).Transparent.Red

myUserColor(PathColor.red3) = myUserColor(PathColor.red3).Brown
myUserColor(PathColor.red4) = myUserColor(PathColor.red4).Brown


myUserColor(PathColor.BLUE1) = myUserColor(PathColor.BLUE1).Blue
myUserColor(PathColor.blue2) = myUserColor(PathColor.blue2).Blue
myUserColor(PathColor.blue3) = myUserColor(PathColor.blue3).Cyan
myUserColor(PathColor.blue4) = myUserColor(PathColor.blue4).Cyan

myUserColor(PathColor.GREEN1) = myUserColor(PathColor.GREEN1).Green
myUserColor(PathColor.green2) = myUserColor(PathColor.green2).Green
myUserColor(PathColor.green3) = myUserColor(PathColor.green3).Yellow
myUserColor(PathColor.green4) = myUserColor(PathColor.green4).Yellow
myUserColor(PathColor.white1) = myUserColor(PathColor.white1).White
myUserColor(PathColor.black1) = myUserColor(PathColor.black1).Black

myPenWidth(pathwidth.red1w) = 5
myPenWidth(pathwidth.red2w) = 15
myPenWidth(pathwidth.red3w) = 5
myPenWidth(pathwidth.red4w) = 15

myPenWidth(pathwidth.blue1w) = 5
myPenWidth(pathwidth.blue2w) = 15
myPenWidth(pathwidth.blue3w) = 5
myPenWidth(pathwidth.blue4w) = 15

myPenWidth(pathwidth.green1w) = 5
myPenWidth(pathwidth.green2w) = 15
myPenWidth(pathwidth.green3w) = 5
myPenWidth(pathwidth.green4w) = 15
myPenWidth(pathwidth.whitew) = 5
myPenWidth(pathwidth.blackw) = 5

End Sub



Paint event code:

Dim CurrentPen = New Pen(Color.FromArgb(myAlpha, myUserColor(index)), myPenWidth(index))
'Set up the pen
Graphics.FromImage(picboard.Image).DrawPath(CurrentPen, path(index))

Welcome any help!!


GeneralRe: Freehand drawing in VB.NET Pin
Christian Graus16-May-05 14:20
protectorChristian Graus16-May-05 14:20 
Generalsend fax through fax service Pin
amit__816-May-05 1:42
amit__816-May-05 1:42 
GeneralRe: send fax through fax service Pin
Gavin Jeffrey16-May-05 4:32
Gavin Jeffrey16-May-05 4:32 
GeneralRe: send fax through fax service Pin
amit__816-May-05 18:34
amit__816-May-05 18:34 
QuestionHow can I stop page-tracking after printer finished printing? Pin
S.Mostapha Kalami16-May-05 1:33
S.Mostapha Kalami16-May-05 1:33 
GeneralSelecting items in the ListView Control Pin
cpod15-May-05 18:05
cpod15-May-05 18:05 
GeneralRe: Selecting items in the ListView Control Pin
carlos_rocha16-May-05 4:01
carlos_rocha16-May-05 4:01 
GeneralRe: Selecting items in the ListView Control Pin
cpod16-May-05 19:26
cpod16-May-05 19:26 
GeneralRe: Selecting items in the ListView Control Pin
carlos_rocha16-May-05 22:04
carlos_rocha16-May-05 22:04 
Questionhow to get email and read its content + filtering Pin
TIFC15-May-05 17:38
TIFC15-May-05 17:38 
AnswerRe: how to get email and read its content + filtering Pin
Colin Angus Mackay16-May-05 1:30
Colin Angus Mackay16-May-05 1:30 
Questionhow to create a multithreaded server Pin
TIFC15-May-05 17:35
TIFC15-May-05 17:35 
Generalplease guide me... Pin
besah15-May-05 17:24
besah15-May-05 17:24 
GeneralRe: please guide me... Pin
Christian Graus16-May-05 14:21
protectorChristian Graus16-May-05 14:21 
GeneralIdentity a row in database table Pin
VOmigrant15-May-05 15:27
VOmigrant15-May-05 15:27 
GeneralRe: Identity a row in database table Pin
Colin Angus Mackay16-May-05 1:25
Colin Angus Mackay16-May-05 1:25 
GeneralCustom textbox control Pin
Anonymous15-May-05 11:34
Anonymous15-May-05 11:34 

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.