|
Imports System.IO
Public Class Form1
Private Sub ImprovedRTB1_LineInformation(ByVal LineStatus As System.String) Handles Irtb1.LineInformation
Dim LineInfo As Array
LineInfo = Split(LineStatus, ",")
LineColInformation.Text = "Line:" & LineInfo(0) & " Col:" & LineInfo(1)
TextBox7.Text = LineStatus
End Sub
Private Sub DragDropnInformation(ByVal FileName As System.String) Handles Irtb1.DragDropFileInformation
If System.IO.File.Exists(FileName) Then
Irtb1.IRTBFileToLoad = FileName
Dim finfo As New FileInfo(FileName)
TextBox10.Text = finfo.Name
TextBox6.Text = Str(Math.Round(finfo.Length / 1024)) & "Kb"
TextBox9.Text = Irtb1.IRTBContainer.Lines.Count.ToString
TextBox8.Text = Str(Irtb1.ShowTotalChar)
End If
End Sub
Private Sub IRTBCheckLN_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles IRTBCheckLN.CheckedChanged
Irtb1.IRTBEnableNumbering = IRTBCheckLN.Checked
End Sub
Private Sub IRTBCheckHL_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles IRTBCheckHL.CheckedChanged
Irtb1.IRTBEnableHighLight = IRTBCheckHL.Checked
End Sub
Private Sub IRTBFont_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles IRTBFont.Click
FontDialog1.ShowDialog()
Irtb1.IRTBFont = FontDialog1.Font
End Sub
Private Sub IRTBHLColor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles IRTBHLColor.Click
SelectColor.Color = Irtb1.IRTBHighLightColor
SelectColor.ShowDialog()
Irtb1.IRTBHighLightColor = SelectColor.Color
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
TestLoadFile.ShowDialog()
If System.IO.File.Exists(TestLoadFile.FileName) Then
Irtb1.IRTBFileToLoad = TestLoadFile.FileName
Dim finfo As New FileInfo(TestLoadFile.FileName)
TextBox10.Text = finfo.Name
TextBox6.Text = Str(Math.Round(finfo.Length / 1024)) & "Kb"
TextBox9.Text = Irtb1.IRTBContainer.Lines.Count.ToString
TextBox8.Text = Str(Irtb1.ShowTotalChar)
End If
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
IRTBCheckLN.Checked = Irtb1.IRTBEnableNumbering
IRTBCheckHL.Checked = Irtb1.IRTBEnableHighLight
Irtb1.IRTBPrefix = False
RadioButton1.Checked = True
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
Irtb1.IRTBAlignNumbers = IRTB.IRTB.IRTBAlignPos.Left
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
Irtb1.IRTBAlignNumbers = IRTB.IRTB.IRTBAlignPos.Right
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
Irtb1.IRTBPrefix = CheckBox1.Checked
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SelectColor.Color = Irtb1.IRTBLNFontColor
SelectColor.ShowDialog()
Irtb1.IRTBLNFontColor = SelectColor.Color
End Sub
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.