Imports Gemeinsames Imports System.ComponentModel Public Class MyTextCheckBox Inherits System.Windows.Forms.TextBox Public Sub New() Me.ShortcutsEnabled = False Me.Width = 20 Me.Height = 20 Me.ReadOnly = True Me.Cursor = Cursors.Hand End Sub Private Sub MyTextCheckBox_Click(sender As Object, e As EventArgs) Handles Me.Click Dim small As New Font(Me.Font.FontFamily, 6) Dim big As New Font(Me.Font.FontFamily, 8.25) Me.Font = big Select Case Me.Text Case "" : Me.Text = "X" Case "X" : Me.Text = "BAR" : Me.Font = small Case "BAR" : Me.Text = "" End Select End Sub ' Private Sub MyTextCheckBox_GotFocus(sender As Object, e As EventArgs) Handles Me.GotFocus ' Me.SelectedText = "" ' End Sub Private bool As Boolean = False Private Sub TextBox1_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown bool = True End Sub Private Sub TextBox1_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove If bool Then Me.SelectionStart = Me.TextLength End If End Sub Private Sub TextBox1_MouseUp(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp bool = False End Sub End Class