-
Notifications
You must be signed in to change notification settings - Fork 470
/
Copy pathJokeSample.vb
66 lines (57 loc) · 2.27 KB
/
JokeSample.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Imports FastColoredTextBoxNS
Imports System
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Namespace TesterVB
Public Class JokeSample
Inherits Form
Private components As IContainer = Nothing
Private timer1 As Timer
Private fctb As FastColoredTextBox
Public Sub New()
Me.InitializeComponent()
Me.fctb.DefaultStyle = New JokeStyle()
End Sub
Private Sub timer1_Tick(sender As Object, e As EventArgs)
Me.fctb.Invalidate()
End Sub
Protected Overrides Sub Dispose(disposing As Boolean)
If disposing AndAlso Me.components IsNot Nothing Then
Me.components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
Private Sub InitializeComponent()
Me.components = New Container()
Dim resources As ComponentResourceManager = New ComponentResourceManager(GetType(JokeSample))
Me.timer1 = New Timer(Me.components)
Me.fctb = New FastColoredTextBox()
MyBase.SuspendLayout()
Me.timer1.Enabled = True
Me.timer1.Interval = 10
AddHandler Me.timer1.Tick, New EventHandler(AddressOf Me.timer1_Tick)
Me.fctb.AutoIndent = False
Me.fctb.AutoScrollMinSize = New Size(0, 621)
Me.fctb.Cursor = Cursors.IBeam
Me.fctb.Dock = DockStyle.Fill
Me.fctb.Font = New Font("Courier New", 18.0F, FontStyle.Regular, GraphicsUnit.Point, 204)
Me.fctb.LeftBracket = "("
Me.fctb.Location = New Point(0, 0)
Me.fctb.Name = "fctb"
Me.fctb.RightBracket = ")"
Me.fctb.ShowLineNumbers = False
Me.fctb.Size = New Size(438, 287)
Me.fctb.TabIndex = 0
Me.fctb.Text = resources.GetString("fctb.Text")
Me.fctb.WordWrap = True
MyBase.AutoScaleDimensions = New SizeF(6.0F, 13.0F)
MyBase.AutoScaleMode = AutoScaleMode.Font
MyBase.ClientSize = New Size(438, 287)
MyBase.Controls.Add(Me.fctb)
MyBase.Name = "JokeSample"
Me.Text = "JokeSample"
MyBase.ResumeLayout(False)
End Sub
End Class
End Namespace