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

Visual Basic

 
GeneralRe: How to write into the text file line by line without the space in between the line? Pin
sweehin1824-Jul-07 8:32
sweehin1824-Jul-07 8:32 
GeneralRe: How to write into the text file line by line without the space in between the line? Pin
Luc Pattyn24-Jul-07 11:45
sitebuilderLuc Pattyn24-Jul-07 11:45 
GeneralRe: How to write into the text file line by line without the space in between the line? Pin
sweehin1824-Jul-07 23:06
sweehin1824-Jul-07 23:06 
GeneralRe: How to write into the text file line by line without the space in between the line? Pin
Luc Pattyn24-Jul-07 23:33
sitebuilderLuc Pattyn24-Jul-07 23:33 
GeneralRe: How to write into the text file line by line without the space in between the line? Pin
sweehin1824-Jul-07 23:48
sweehin1824-Jul-07 23:48 
GeneralRe: How to write into the text file line by line without the space in between the line? Pin
Luc Pattyn24-Jul-07 23:59
sitebuilderLuc Pattyn24-Jul-07 23:59 
Questionerror at runtime Pin
Sonia Gupta22-Jul-07 21:19
Sonia Gupta22-Jul-07 21:19 
QuestionTransparencykey for runtime drawing Pin
Ahmad Zaidi22-Jul-07 20:56
Ahmad Zaidi22-Jul-07 20:56 
Hi,

I am trying to make a user control which gives the look of a postage stamp (with jagged edges). I am doing this by overloading the OnPaint event and drawing in it. But despite specifying the pen color as transparent, the control still doesnt appear see thru where I draw the shape. I have even tried specifying the color as black and setting the container forms transparencyKey property to black. Here is the code i am putting into the OnPaint Event:


Dim graphics As Graphics = e.Graphics
Dim penWidth As Integer = 30
Dim pen As Pen = New Pen(Color.Transparent, 30)

Dim fontHeight As Integer = 10
Dim font As Font = New Font("Arial", fontHeight)

'Dim brush As SolidBrush = New SolidBrush(BackgroundColor)

'Fetch the heights and widths

Dim controlHeight As Integer = Me.Size.Height
Dim controlWidth As Integer = Me.Size.Width

Dim initialHeight As Integer = 0
Dim initialWidth As Integer = 0

Dim goLeft As Boolean = False


'Start drawing a jagged edge from the top left corner to the bottom left
While controlHeight >= 0
If goLeft = True Then
graphics.DrawLine(pen, initialHeight, initialWidth, initialHeight + 10, initialWidth + 10)
'Set them to the new starting point
initialHeight = initialHeight + 10
initialWidth = initialWidth + 10
'Now set goleft to false
goLeft = False

Else
graphics.DrawLine(pen, initialHeight, initialWidth, initialHeight + 10, initialWidth - 10)
'Set them to the new starting point
initialHeight = initialHeight + 10
initialWidth = initialWidth - 10
'Now set goleft to false
goLeft = True


End If

'Dencrement the counter
controlHeight = controlHeight - 10

End While

Thanks in advance for any help!

AnswerRe: Transparencykey for runtime drawing Pin
Tom Deketelaere22-Jul-07 22:36
professionalTom Deketelaere22-Jul-07 22:36 
GeneralRe: Transparencykey for runtime drawing Pin
Ahmad Zaidi23-Jul-07 0:56
Ahmad Zaidi23-Jul-07 0:56 
GeneralRe: Transparencykey for runtime drawing Pin
Tom Deketelaere23-Jul-07 1:29
professionalTom Deketelaere23-Jul-07 1:29 
AnswerRe: Display text doc Pin
Sathesh Sakthivel22-Jul-07 20:14
Sathesh Sakthivel22-Jul-07 20:14 
GeneralRe: Display text doc Pin
ASPnoob22-Jul-07 20:16
ASPnoob22-Jul-07 20:16 
GeneralRe: Display text doc Pin
Paul Conrad22-Jul-07 20:18
professionalPaul Conrad22-Jul-07 20:18 
Questiontwo dimensional array in vb.net Pin
Sonia Gupta22-Jul-07 19:18
Sonia Gupta22-Jul-07 19:18 
AnswerRe: two dimensional array in vb.net Pin
Christian Graus22-Jul-07 20:34
protectorChristian Graus22-Jul-07 20:34 
GeneralRe: two dimensional array in vb.net Pin
Sonia Gupta22-Jul-07 21:00
Sonia Gupta22-Jul-07 21:00 
GeneralRe: two dimensional array in vb.net Pin
Christian Graus22-Jul-07 21:36
protectorChristian Graus22-Jul-07 21:36 
GeneralRe: two dimensional array in vb.net Pin
Sonia Gupta22-Jul-07 21:41
Sonia Gupta22-Jul-07 21:41 
GeneralRe: two dimensional array in vb.net Pin
Christian Graus23-Jul-07 0:10
protectorChristian Graus23-Jul-07 0:10 
AnswerRe: two dimensional array in vb.net Pin
Dave Kreskowiak23-Jul-07 3:21
mveDave Kreskowiak23-Jul-07 3:21 
QuestionBranching a solution Pin
Salvador Rocha22-Jul-07 17:55
Salvador Rocha22-Jul-07 17:55 
AnswerRe: Branching a solution Pin
Luc Pattyn23-Jul-07 2:51
sitebuilderLuc Pattyn23-Jul-07 2:51 
GeneralRe: Branching a solution Pin
Salvador Rocha23-Jul-07 9:34
Salvador Rocha23-Jul-07 9:34 
GeneralRe: Branching a solution Pin
Luc Pattyn23-Jul-07 9:46
sitebuilderLuc Pattyn23-Jul-07 9:46 

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.