Textbox\'ta yazı işlemleri

Başlatan BlueCode, 25 Nisan 2011, 03:40:18

BlueCode

Bu dersimizde textbox ile yazı işlemleri yapalım.

Eklenecekler:

1 adet textbox
9 adet button
1 adet fontdiyalog
1 adet colordialog

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox1.SelectionLength > 0 Then
            TextBox1.Cut()
        Else
            MsgBox(\"Seçili Alan Yok!\")

        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If TextBox1.SelectionLength > 0 Then
            TextBox1.Copy()
        Else
            MsgBox(\"Seçili Alan Yok!\")
        End If
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        TextBox1.Paste()

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        TextBox1.Undo()
        TextBox1.Font = New Font(Font, FontStyle.Regular)
        TextBox1.ForeColor=color.Black
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        If FontDialog1.ShowDialog = DialogResult.OK Then
            TextBox1.Font = FontDialog1.Font

        End If
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        If ColorDialog1.ShowDialog = DialogResult.OK Then
            TextBox1.ForeColor = ColorDialog1.Color

        End If
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        TextBox1.Font = New Font(Font, FontStyle.Bold)

    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        TextBox1.Font = New Font(Font, FontStyle.Italic)
    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        TextBox1.Font = New Font(Font, FontStyle.Underline)
    End Sub

Hızlı Yanıt

Not: Bu konu bir moderatör tarafından onaylanmadan görüntülenmeyecektir.

Adı:
E-Posta:
Doğrulama:
Lütfen bu kutuyu boş bırakın:
IRFP250 Nedir:
kısayollar: göndermek için alt+s veya önizleme yapmak için alt+p'ye basın